Skip to content

Different implementations of the Y-Combinator in modern programming languages

Notifications You must be signed in to change notification settings

norskovsen/Y-Combinator-Impl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Y-Combinator-Impl

y.combinator

This is my implementations of the Y-Combinator in different programming languages. The Y-Combinator is a way to make recursive functions in programming languages which does not support it. It was discovered by Haskell B. Curry and defined using Lambda Calculus.

Inspiration

I learned about the Y-combinator when watching the Computerphile video about the Wikipedia after watching their video about Lambda Calculus.. I did not quite understand it at first. Therefore I decided to try and implement it to get a better understand it

Z-Combinator

z.combinator

My implementations except for in Haskell is the Z-Combinator, which is the Y-Combinator for eager evaluating languages. This prevents infinte loops by wrapping the inner function in another lambda.

Programming languages

  • Javascript
  • Elisp
  • Python
  • Scheme
  • Java
  • Ruby
  • Haskell
  • Erlang
  • Elixir

More information

Good places to learn more about the Y-Combinator: