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

Function of the form [1]X[2]

Sample Code 1

a:rsl
sassassasasaasasaasa
[24B]

The code above can be compressd by using a function.

a:rsl
f(X):sXa
f()sf()sf()f()f()af()f()af()
f(X):sXrsl
f()f(f()f(f()f()f())f()f())f()
[19B]

Sample Code 2

x:rsl
a:xxsxssxsxxxsxsla
a
[22B]
x:rsl
f(X):xXs
a:f(f()f())f()xxf()f()la
a

By adding two extra "s", we can use rslXs function completely!

x:rsl
f(X):xXs
a:f(f()f())f()xxf()f()lass
a
f(X):rslXs
a:f(f()f())f()f(f(f()f()la))
a
[19B]

Examples

Function of the form X[1]X

Sample Code 1

f(X):XX
a(X):f(f(f(f(XXr))r))a(srslX)
a()
[21B]
f(X):XrX
a(X):f(f(f(f(XX))r))a(f(s)lX)
a()
[20B]

If we define a function "f(X):X[1]X", we have "f(f(X)) = X[1]X[1]X[1]X",
and this equals "(4 times X[1]) minus [1]".

Sample Code 2

f(X):XsssX
f(f(rf(f(rsssssssssrsssrrsssr))))
f(X):XsssX
f(f(rf(f(rf(f())f(r)f(r)))))

Functions of the form "X[1]X" works like "double function".
Moreover, the function "XsssX" can make "sss" in 1B.

Examples

Function with many variables

Sample Code 1

f(X,Y):XXXYY
[8B]

You can use f as double function, and as triple function.
This function definition costs less than

a(X):XX
b(X):XXX
[7B]

Sample Code 2

f(X,Y):XYXYYYX

This function can be used


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