4 ms·
For what purpose?
by furhxbbd 10y ago
For what purpose?
- qwertyuiop924 10y agoQuoth xkcd, "Tail recusion is its own reward." In all seriousness, even if the y combinator is practically useless in languages that don't have proper TCO (which is specced for ES7), it's a useful learning tool, is powerfully mind expanding, and can help to demonstrate the power of the λ-calculus.
- viebel 10y agoThere is a practical application for recursive memoization: http://blog.klipse.tech/lambda/2016/08/10/y-combinator-app-javascript.html http://blog.klipse.tech/lambda/2016/08/10/y-combinator-app-j...
- kristianp 10y agohttp://xkcd.com/1270/ http://xkcd.com/1270/
- gohrt 10y agoIs the Y-combinator any more or less dependent on TCO than regular recursion? The Y combinator is useless in languages that already have builtin support for recursive functions.
- viebel 10y agoNot useless, almost useless: You can do elegant recursive memoization with the Y combinator as explained here http://blog.klipse.tech/lambda/2016/08/10/y-combinator-app-javascript.html http://blog.klipse.tech/lambda/2016/08/10/y-combinator-app-j...
- qwertyuiop924 10y agoNo, Y is handy for defining nameless recursive functions, but it blows the stack even faster if you don't have TCO.
- agumonkey 10y agoImplementing a linguistic trait when not built in. Next: continuations. Next: prolog.
- pjssjppjs 10y agohttps://github.com/IvanIvanov/JavaScript-Logic-Programming-System https://github.com/IvanIvanov/JavaScript-Logic-Programming-S...