English Page
Elementary Techniques | Techniques of Function | Techniques of Recursion | Techniques of Number
ssrsssslss (10B)
a:ss araala (9B)
a:srsla a
Note that Loop can be recognized as a "recursive function with 0 variables".
f(X):XXXXr f(f(f(ss))f(f(srsl))f(sr))
a(X):XXa(rslsX) a(r)
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.
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.
a(X,Y):Xra(XY,X) a(,)
a(X,Y):Xa(YrXYl,sY) a(r,)
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]
a(X,T):Xra(sX,T-1)a(,5) a(,10)
a(X,T):sXa(lsrXrsl,T-1)Xs a(,10)
Note that the "most-grown-terms" appears in the middle.