4.3 The Top Level
TBoS p 34-35
The Shen top level is a read-evaluate-print loop as in all functional languages. When you start it up, you
get something this (depending on release and platform).
Shen, copyright (C) 2010-2015 Mark Tarver
www.shenlanguage.org, Shen 30
running under Common Lisp, implementation: SBCL
port 3.1 ported by Mark Tarver
Each input is numbered starting with 0.
The top level has a feature borrowed from Unix of allowing past inputs to be repeated. !! repeats and evaluates the
last input. !n repeats and evaluates the nth input. !s where s is a symbol repeats the last input whose leading function
has s as a prefix. %n prints the nth input w.o. evaluation. %s prints the last expression entered whose prefix is s.
% prints all expressions entered since the session began.
(1-) (* 7 8)
(* 7 8)
(* 7 8)
1. (* 7 8)
2. (* 7 8)
3. (* 7 8)