Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
1
Task/Y-combinator/CoffeeScript/y-combinator-1.coffee
Normal file
1
Task/Y-combinator/CoffeeScript/y-combinator-1.coffee
Normal file
|
|
@ -0,0 +1 @@
|
|||
Y = (f) -> g = f( (t...) -> g(t...) )
|
||||
1
Task/Y-combinator/CoffeeScript/y-combinator-2.coffee
Normal file
1
Task/Y-combinator/CoffeeScript/y-combinator-2.coffee
Normal file
|
|
@ -0,0 +1 @@
|
|||
Y = (f) -> ((h)->h(h))((h)->f((t...)->h(h)(t...)))
|
||||
2
Task/Y-combinator/CoffeeScript/y-combinator-3.coffee
Normal file
2
Task/Y-combinator/CoffeeScript/y-combinator-3.coffee
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
fac = Y( (f) -> (n) -> if n > 1 then n * f(n-1) else 1 )
|
||||
fib = Y( (f) -> (n) -> if n > 1 then f(n-1) + f(n-2) else n )
|
||||
Loading…
Add table
Add a link
Reference in a new issue