3. Running the Interpreter

Psyche contains a simple interactive interpreter. The interpreter can be started with the command /usr/local/bin/psyche, assuming that you installed Psyche in /usr/local.

The interpreter uses the console for its I/O; no fancy windows or anything. When possible, it uses the GNU readline interface for its input.

Example 3..1   A session with the interpreter
$ /usr/local/bin/psyche
Psyche version X.Y, Copyright (C) 2002 Y. Duppen

Psyche comes with ABSOLUTELY NO WARRANTY.  This is free software, and
you are welcome to redistribute it under certain conditions; read the
attached COPYING for details.

psyche> (define x 5)

psyche> (define (square n)
......>         (* n n))

psyche> (square x)
25

psyche> (square 4)
16

psyche> (square "hello")
Error: unsupported operand type(s) for *: 'str' and 'str'

psyche> (quit)

$

Y. Duppen