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:
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
'
?
The single-quote character is shorthand way of saying (quote foo) where quote is the form to return just foo without evaluating it.
One thing to really remember in Scheme or any Lisp for that matter is that everything is evaluated by default. So, in cases where you don't want to evaluate you need a way to sat this.
Quoting something does just this and the single-quote is just requires less typing and leads to less verbose code.