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

Replace

Sample Code

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

Examples

Loop

Sample Code

a:srsla
a

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

Examples

Function

Sample Code

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

Examples

Recursive function

Sample Code 1

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.

Examples

Recursive function with many variables

Sample Code 1

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

Sample Code 2

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

Examples

Function with a number

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


トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2013-02-13 (水) 23:21:08 (2134d)