Recursoin

From Esolang
Jump to navigation Jump to search
Not to be confused with Recursion.

Recursoin is an esoteric programming language by User:A.

Variables are defined like: var = bar

+
-
do math. For example:
    x=4
    Jerome=x - 2

sets x as value 4 and Jerome as value 2 (4-2). Also:

    fruit=fly
    printer=paper
    sticky=fruit + printer

sets fruit as value fly, printer as value paper, and sticky as value flypaper (word math only works with plus).

function x(parameters) starts a while loop named x with the given parameters.
end signifies the end of function.
if condition
starts an if(ends with end)

Conditions have three parts, two compared values referenced by their names and a comparison which can be:

!= is not equal to
== is equal to
sendvalue x
return x

Example

Ackermann Function:

function Ackermann(m, n)
if m==0
    sendvalue n+1
end
if m !=0
    if n==0
        sendvalue Ackermann(m-1,1)
    end
    if n!=0
        sendvalue Ackermann(m-1,Ackermann(m,n-1))
    end
end