English Page
Elementary Techniques | Techniques of Function | Techniques of Recursion | Techniques of Number

[10B]
a:ss
araala
[9B]

Loop

Sample Code

a:srsla
a

Note that Loop can be recognized as a "recursive function with 0 variables".

Function

Sample Code

f(X):XXXXr
f(f(f(ss))f(f(srsl))f(sr))

Recursive function

a(X):XXa(rslsX)
a(r)

Sample Code 2

f(X):XXXXr
a(X):f(f(X))a(ssX)
a(r)

It is sometimes important to use some auxiliary function in a recursive function.

Sample Code 3

a(X):sssXssXXXa(l)
a(r)

"Not-growing" recursion is also important.
This is 0-variables version of "special first term technique" in the Advanced Techniques 2? Page.
By the way, this code can be compressed by "multiple recursion" in the Advanced Techniques 2? Page.

Recursive function with many variables

a(X,Y):Xra(XY,X)
a(,)

Sample Code 2

a(X,Y):Xa(YrXYl,sY)
a(r,)

Function with a number

• "FUNCTION(non-positive number)" vanishes.
• You can't use numbers greater than 255.

Sample Code 1

a(T):sa(T-1)
a(11)ra(15)ra(13)l
[15B]
a(T):sa(T-1)l
a(11)a(15)a(13)
[13B]

Sample Code 2

a(X,T):Xra(sX,T-1)a(,5)
a(,10)

Sample Code 3

a(X,T):sXa(lsrXrsl,T-1)Xs
a(,10)

Note that the "most-grown-terms" appears in the middle.

Examples

• Problem?
• Problem?

Last-modified: 2013-02-13 (水) 23:21:08 (2435d)