What is ' (apostrophe) in Lisp / Scheme?

jjerms picture jjerms · Oct 8, 2009 · Viewed 28.8k times · Source

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:

  1. Is the interpreter I mentioned above a good one? Can you recommend another? I need one that will go well with The Little Schemer.

  2. What is '?

Answer

Jonathan Feinberg picture Jonathan Feinberg · Oct 8, 2009

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 and replace it with its value; I really mean the name foo".

I think SISC is perfectly fine for exploring the exercises in TLS.