4 ms·
You can still do a Y combinator in JavaScript. In http://www.mail-archive.com/boston-pm@mail.pm.org/msg02716.html http://www.mail-archive.com/boston-pm@mail.pm
by tilly 17y ago
You can still do a Y combinator in JavaScript. In http://www.mail-archive.com/boston-pm@mail.pm.org/msg02716.html http://www.mail-archive.com/boston-pm@mail.pm.org/msg02716.h... I not only show how to do it, but I show one way that someone reasonably could come up with the construct.
But I agree with you that Y combinators are not generally a good approach for working programmers because there are clearer ways of accomplishing the same thing. However I've heard that in some functional languages they can be very useful as a pattern to compile language constructs to.
- IsaacSchlueter 17y agoI also did something like this. It's fun to port lisp constructs to Javascript. http://foohack.com/tests/ycomb.html http://foohack.com/tests/ycomb.html