Icon

Icon

Installation

Arch Linux
yay -S icon
git(linux)
git clone https://github.com/gtownsend/icon.git
cd icon
make Configure name=linux
make
mv bin /usr/local/bin

Examples

Fibonacci Numbers
# Fibonacci Numbers
procedure fib(n)
    if n < 2 then
        return n
    else
        return fib(n - 2) + fib(n - 1)
end

procedure main(args)
    local n
    n := args[1]
    write(fib(n))
end

# example
#    interpreter:
#        icon fib.icn 30
#    translator:
#        icont fib.icn
#        ./fib 30