tisp

tiny lisp
git clone git://edryd.org/tisp
Log | Files | Refs | LICENSE

commit 602e9f8834dcba633fcd335d9f081bea808db16c
parent 9e999549bb430394315774765172dbc6aac3ddda
Author: Ed van Bruggen <edvb@uw.edu>
Date:   Thu, 21 Feb 2019 20:47:07 -0800

Implement REPL in tisp

Diffstat:
tibs/repl.tsp | 13+++++++++++++
1 file changed, 13 insertions(+), 0 deletions(-)

diff --git a/tibs/repl.tsp b/tibs/repl.tsp @@ -0,0 +1,13 @@ +(define (repl) + (print "> ") + ((lambda (exp) + (cond ((= exp 'quit) (print (newline))) + (t (begin + ((lambda (eval-exp) + (cond ((not (void? eval-exp)) + (disp eval-exp)))) + (eval exp)) + (repl))))) + (read))) + +(repl)