3 ms·
That is a nice description of how to arrive at the Y-combinator. There was a talk using similar examples which I think is very educational. https://www.infoq.
by grdvnl 9y ago
That is a nice description of how to arrive at the Y-combinator.
There was a talk using similar examples which I think is very educational.
https://www.infoq.com/presentations/Y-Combinator https://www.infoq.com/presentations/Y-Combinator
I wrote down the examples used in the video (given the poor quality of video) to help myself learn about the Y-Combinator
https://gist.github.com/gdevanla/9171085 https://gist.github.com/gdevanla/9171085
Recently, I presented this topic to my team and wrote down a Python equivalent of this example.
https://gist.github.com/gdevanla/07a08d99e183f494d036c6d6fe665c09 https://gist.github.com/gdevanla/07a08d99e183f494d036c6d6fe6...
- pimeys 9y agoDo you always need some lazy evaluation to arrive at the Y-combinator? It seems that even for the strict example a lambda was used to hold the recursive call evaluating too early. Well, anyways, these are very interesting ideas to study and opened up some of the reasoning behind Haskell's laziness for me.
- grdvnl 9y agoIt doesn't have to be. The stricter version is called 'applicative-order' Y-combinator. The article talks about both versions as well.