I am on day 1 hour 1 of teaching myself Scheme. Needless to say, I don't understand anything. So I'm reading The Little Schemer and using this thing:
http://sisc-scheme.org/sisc-online.php
as an interpreter.
I need to use '
in for example
(atom? 'turkey)
to avoid an "undefined variable" error. The '
, according to the book, is a Common Lisp thing.
I have two questions:
Is the interpreter I mentioned above a good one? Can you recommend another? I need one that will go well with The Little Schemer.
What is '
?
Because quote is used so often in programs, Lisp provides a convenient read syntax for it. An apostrophe character (' ' ') followed by a Lisp object (in read syntax) expands to a list whose first element is quote , and whose second element is the object.
Produces a constant value corresponding to datum (i.e., the representation of the program fragment) without its lexical information, source location, etc. Quoted pairs, vectors, and boxes are immutable.
Advertisements. In LISP, a symbol is a name that represents data objects and interestingly it is also a data object. What makes symbols special is that they have a component called the property list, or plist.
Scheme is a dialect of Lisp that stresses conceptual elegance and simplicity. It is specified in R4RS and IEEE standard P1178. (See the Scheme FAQ for details on standards for Scheme.) Scheme is much smaller than Common Lisp; the specification is about 50 pages, compared to Common Lisp's 1300 page draft standard.
The form 'foo
is simply a faster way to type the special form
(quote foo)
which is to say, "do not evaluate the name foo
replacing it with its value; I really mean the name foo
itself".
I think SISC is perfectly fine for exploring the exercises in TLS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With