5 ms·
λ-calculus in JavaScript
- apgwoz 17y agoI'm going to be nit-picky here, but this should really have been described as Church encoding in JavaScript.
- enum 17y agoIt's great what you can do with first-class functions. But, without tail calls, simple uses of the Y combinator will run out of stack space.
- tzury 17y agoWell, the most astonishing fact is the script-less approach. Also note that this example contains no <script> tag but the "Show Me!" still works. Trick? onclick="eval(document.getElementById('lambda').firstChild.nodeValue)".