The Little JavaScripter
Tim Finin, 10:26am 13 February 2005
Wow, Douglas Crockford’s The Little JavaScripter made me vow to take a more serious look at Javascript. Like most of my colleagues, I’ve thought of it as another weak, poorly designed and inelegant programming language. Crockford points out that
“JavaScript has much in common with Scheme. It is a dynamic language. It has a flexible datatype (arrays) that can easily simulate s-expressions. And most importantly, functions are lambdas. Because of this deep similarity, all of the functions in The Little Schemer can be written in JavaScript. The syntaxes of these two languages are very different, so some transformation rules are needed.
…
I have prepared a file containing primitive functions (cons, cdr, etc.), a pair of functions (p and s) for converting from s-expressions to text and back), and most of the functions in the book, expressed in JavaScript. Pay particular attention to The Applicative Order Y Combinator, one of the most strange and wonderful artifacts of Computer Science.”
Now, if I can only figure out how to use the Y operator on one of our web pages…

