You are looking at historical revision 34052 of this page. It may differ significantly from its current revision.

Module (chicken repl)

This module provides procedures you can use to create your own Read-Eval-Print Loop (REPL).

repl

[procedure] (repl [EVALUATOR])

Start a new read-eval-print loop. Sets the reset-handler so that any invocation of reset restarts the read-eval-print loop. Also changes the current exception-handler to display a message, write any arguments to the value of (current-error-port) and reset.

If EVALUATOR is given, it should be a procedure of one argument that is used in place of eval to evaluate each entered expression.

You can use quit to terminate the current read-eval-print loop.

repl-prompt

[parameter] (repl-prompt)

A procedure that should evaluate to a string that will be printed before reading interactive input from the user in a read-eval-print loop. Defaults to (lambda () "#;N> ").


Previous: Module (chicken read-syntax)

Next: Module (chicken syntax)