Arc Forumnew | comments | leaders | submitlogin
Y combinator in arc
3 points by fail 6175 days ago | 1 comment
What is the most elegant definition?

Here's mine: (fn (m) ([_ _] (fn (y) (m [(y y) _]))))

(( (fn (m) ([_ _] (fn (y) (m [(y y) _])))) (fn (fac) (fn (n) (if (is n 0) 1 (* n (fac (- n 1))))))) 5) ;=> 120



1 point by petdog 6174 days ago | link

I have one in my "hello world" thread.

-----