norskovsen / Y-Combinator-Impl

Different implementations of the Y-Combinator in modern programming languages

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:

About

Different implementations of the Y-Combinator in modern programming languages


Languages

Language:Erlang 18.8%Language:Emacs Lisp 18.2%Language:Java 17.1%Language:JavaScript 10.9%Language:Elixir 10.0%Language:Scheme 8.7%Language:Haskell 5.8%Language:Python 5.7%Language:Ruby 4.8%