Skip to content

Instantly share code, notes, and snippets.

@havenwood
Last active April 6, 2016 02:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save havenwood/9af042826d7288f52df8da396235951b to your computer and use it in GitHub Desktop.
Save havenwood/9af042826d7288f52df8da396235951b to your computer and use it in GitHub Desktop.
def z_combinator f
->(gen) { f.(->(_) { gen.(gen).(_) }) }.(
->(gen) { f.(->(_) { gen.(gen).(_) }) } )
end
def z_combinator f
->(gen) { gen.(gen) }.(
->(gen) { f.(->(_) { gen.(gen).(_) }) } )
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment