Talk:Y combinator: Difference between revisions

No edit summary
Line 74:
(define Y
(lambda (f)
(f (delaylambda (Y f))))x)
(f (delay (x x))))
(lambda (x)
(f (delay (x x)))))))
</lang>
but you have to call the function with <lang scheme>(force f)</lang>
Line 80 ⟶ 83:
<lang scheme>
(define fact
(lambda (f)Y
(lambda (nf)
(iflambda (= n 0) 1
(* nif ((force f) (-zero? n 1)))))))
1
(* n ((force f) (- n 1))))))))
</lang>
''Edit: Err... I think I messed it up a little, it should be ok now.''
[[Special:Contributions/93.144.202.116|93.144.202.116]]
Anonymous user