September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
11
Task/Y-combinator/Shen/y-combinator.shen
Normal file
11
Task/Y-combinator/Shen/y-combinator.shen
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
(define y
|
||||
F -> ((/. X (X X))
|
||||
(/. X (F (/. Z ((X X) Z))))))
|
||||
|
||||
(let Fac (y (/. F N (if (= 0 N)
|
||||
1
|
||||
(* N (F (- N 1))))))
|
||||
(output "~A~%~A~%~A~%"
|
||||
(Fac 0)
|
||||
(Fac 5)
|
||||
(Fac 10)))
|
||||
Loading…
Add table
Add a link
Reference in a new issue