PLT Scheme is so easy to download and get started with. I really recommend you use that instead of JavaScript when working through The Little Schemer. <a href="http://www.plt-scheme.org/" rel="nofollow">http://www.plt-scheme.org/</a><p>I'm working out a problem right now for JavaScript (client-side dictionary/grammar thingy) and it's easier for me to explore the problem in Scheme.<p>I don't really know why anyone would voluntarily choose to use JavaScript when Scheme is available.<p>edit: I'm not hating on this idea. JavaScript DOES have first-class functions and lexical scoping, so you can indeed do The Little Schemer in it. I'm pointing out PLT Scheme for anyone who hasn't already done The Little Schemer and has had their interest piqued.
Now I know where the term Y Combinator came from. Am I the only ignorant one here who had never heard of "The Applicative Order Y Combinator"?<p>JavaScript:<p>function Y(le)
{
return (function (f)
{
return f(f);
}
(function (f)
{
return le(function (x)
{
return f(f)(x);
});
}));
}<p>Trippy recursive function, but I don't think I quite understand what you would use it for. ;)