Skip to content

Instantly share code, notes, and snippets.

View adamisntdead's full-sized avatar
🐢
Working on stuff

Adam Kelly adamisntdead

🐢
Working on stuff
View GitHub Profile
@churchofthought
churchofthought / gist:5202041
Last active October 23, 2017 13:25 — forked from anonymous/gist:5202029
Y Combinator Explained
I just finally had my mind snap into place with understanding of the Y Combinator. Most explanations I read, even the ones using JS, didn't make much sense and were overly long so here follows my own, much simpler explanation. I will be using JS.
We have fibonacci to start with, very simple recursive function.
It's fixed points are 0 and 1, fib(0) = 0, and fib(1) = 1
That's all a fix point means, when the f(x) == x
They are important because they are the only values at which recursion can cease.
Our Fibonacci Function
======================