Recursor

Recursor is a recursion based (loosely) functional programming language created by Ettore Marmo.

Overview
In this language you can define quickly and clearly recursive functions: f(x) = f(x-1) + f(x-2); [1,1] is a valid example. The array after the function body defines the seeds of the function and is to be read like so: f(0) = 1 f(1) = 1 The seeds can also be strings, arrays or floats.

Obviously nested functions are valid statements: H(n) = n-H(H(H(n-1))); [0]

While f(x) behaves like you would expect, returning the xth term of the function, f(*x) returns an array of all the values of the function ranging from 0 to x (inclusive).

Conditionals
This language is also capable of if/else statements with a syntax similar to that of the ternary operator. Keep in mind that these statements can only be defined inside a function.

F(x) = x % 2 == 0 | x > 30 ? x - F(x-1) ;    F(x-1) + x         ; [0]

The symbol between the two conditions is one of the three logical operators implemented: & : and  | : or   || : xor Of course the conditionals can also be nested.

Output
There are two options if you want to print something on the screen: @1,2,"A" prints its arguments with a trailing newline. @@"Hello", "\", "World" prints everything on the same line, note that because the interpreter is dumb you have to write "\" for the space character.

The print functions can be used also inside the body of a function.

Suffixes
There is a bunch of already implemented functions that can be appended after a token, separated with. g = [1,2,3] : function

For arrays only:

For strings/char only:

For ints/floats only:

For arrays and strings:

An example:

f(x) = f(x-1) + f(x-2) ; [1,1] @f(*10):[3,6]:rev:join(",") and it correctly outputs 34,21,13,8,5,3

Iterators
coming soon

Interpreter
coming soon

More Examples
coming soon