where the identifer cdadr is now to be associated with LAMBDA expression:
Thereafter using cdadr as the first item in a list will result in that LAMBDA expression be invoked.
Joe Ganley's Introduction
I wanted to get a feel for just how
powerful JavaScript is as a programming language (as opposed to just a scripting
language), so I sat down one evening and wrote this. It turns out that it was
quite good for this application, since it is so flexible - dynamically sized
arrays are used throughout, and associative arrays make the symbol table quite
easy.
A fairly complete set of Lisp instructions are implemented (see here). The choice of instructions and some of the implementations of the composite functions were taken from Roger Rohrbach's Lisp in Awk interpreter. The syntax is standard, and only integer arithmetic is available. This is Lisp, not Scheme - scoping is dynamic.
Since this is pretty much a toy, it doesn't do much in the way of error handling. However, it should work on correct Lisp code; if it breaks on code you believe to be correct, please send me mail at janlee.10.ganley@spamgourmet.com.
Permission
The source of this interpreter is copied by permission
from Joe Ganley per his copying
restrictions.
NOTE: In this version it is not necessary to include the function name and the arguments in a list as in "standard" LISP.