Little

Little books in Javascript?

There is a very nice web-based javascript version of the great SICP textbook.
Can it also be done for the Little Books?


The Little Javascripter by Douglas Crockford has a table with transformation rules from Scheme to Javascript. For instance we use null instead of ‘() in Scheme. And cdr(a, s) instead of (cdr a s).

All primitives (car cdr cons isAtom isEq isNull) from Chapter 1 “Toys” are available in the Sandboxes.
Do not use “or” in Chapter 2, instead use || in Javascript. Same for “and” and &&.


If you want to try Scheme there is a great site at Try Scheme.

On iPad turn off smart quotes if you want to code in Scheme: Go to Settings - General - Keyboard, and toggle off “Smart Punctuation”. Or use (define my_atom (quote atom)).