Squirrel

Squirrel

Installation

Arch Linux
yay -S squirrel
git
git clone https://github.com/albertodemichelis/squirrel.git
cd squirrel
mkdir build
cd build
cmake ..
make
make install

Examples

Fibonacci Numbers
// Fibonacci Numbers
function fib(n)
{
    if (n < 2)
        return n;
    else
        return fib(n - 2) + fib(n - 1);
}

local n = vargv[0].tointeger()
print(fib(n).tostring() + "\n");

/*
    example
        run
            sq fib.nut 39
*/