June 2018 Update
This commit is contained in:
parent
ba8067c3b7
commit
22f33d4004
5278 changed files with 84726 additions and 14379 deletions
|
|
@ -9,6 +9,13 @@ z = { |f|
|
|||
};
|
||||
)
|
||||
|
||||
// the same in a shorter form
|
||||
|
||||
(
|
||||
r = { |x| x.(x) };
|
||||
z = { |f| r.({ |y| f.(r.(y).(_)) }) };
|
||||
)
|
||||
|
||||
|
||||
// factorial
|
||||
k = { |f| { |x| if(x < 2, 1, { x * f.(x - 1) }) } };
|
||||
|
|
@ -30,10 +37,3 @@ g = z.(k);
|
|||
g.(3)
|
||||
|
||||
(1..10).collect(g) // [ 1, 1, 2, 3, 5, 8, 13, 21, 34, 55 ]
|
||||
|
||||
// a shorter form
|
||||
|
||||
(
|
||||
r = { |x| x.(x) };
|
||||
z = { |f| r.({ |y| f.(r.(y).(_)) }) };
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue