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


トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS