Skip to content

Instantly share code, notes, and snippets.

@Xodarap
Created May 25, 2011 01:01
Show Gist options
  • Save Xodarap/990113 to your computer and use it in GitHub Desktop.
Save Xodarap/990113 to your computer and use it in GitHub Desktop.
YC example
-- An example of how the Y combinator expands into an infinite
-- list of function applications
Y f = (\x -> f (x x)) (\x -> f (x x))
= f $ (\x -> f (x x)) (\x -> f $ x x)
= f $ f $ (\x -> f $ x x) (\x -> f $ x x)
= f $ f $ f $ (\x -> f $ x x) (\x -> f $ x x)
= f $ f $ f $ f $ (\x -> f $ x x) (\x -> f $ x x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment