Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ycombinator in erlang
Y = fun(C) ->
(fun(H) ->
H(H)
end)(
fun(F) ->
C(fun(X) -> (F(F))(X) end)
end
)
end.
Z = fun(M) ->
fun(0) -> 1;
(N) -> N * M(N-1) end
end.
(Y(Z))(10).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.