Lisp Interaction

The Lisp Interpreter is a program that interacts with the user:

  1. Read an expression from the terminal.

  2. Evaluate the expression to determine its value.

  3. Print the value.

  4. Go to step 1.
This is sometimes called the read-eval-print loop.

The interpreter prints a prompt character for input. The prompt is > in DrScheme, : in MacGambit. In MacGambit, an expression is executed by entering cmd-Return (hold down the ``apple'' key while typing Return).


   > 57
   57

> (+ 32 57) 89

> (+ (* 8 4) (- 60 3)) 89

> (sqrt 2) 1.4142135623730951

Contents    Page-10    Prev    Next    Page+10    Index