September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
1
Task/Y-combinator/Zkl/y-combinator-1.zkl
Normal file
1
Task/Y-combinator/Zkl/y-combinator-1.zkl
Normal file
|
|
@ -0,0 +1 @@
|
|||
fcn Y(f){ fcn(g){ g(g) }( 'wrap(h){ f( 'wrap(a){ h(h)(a) }) }) }
|
||||
3
Task/Y-combinator/Zkl/y-combinator-2.zkl
Normal file
3
Task/Y-combinator/Zkl/y-combinator-2.zkl
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fcn almost_factorial(f){ fcn(n,f){ if(n<=1) 1 else n*f(n-1) }.fp1(f) }
|
||||
Y(almost_factorial)(6).println();
|
||||
[0..10].apply(Y(almost_factorial)).println();
|
||||
3
Task/Y-combinator/Zkl/y-combinator-3.zkl
Normal file
3
Task/Y-combinator/Zkl/y-combinator-3.zkl
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fcn almost_fib(f){ fcn(n,f){ if(n<2) 1 else f(n-1)+f(n-2) }.fp1(f) }
|
||||
Y(almost_fib)(9).println();
|
||||
[0..10].apply(Y(almost_fib)).println();
|
||||
Loading…
Add table
Add a link
Reference in a new issue