Add missing clean targets in 5 impls.
[jackhill/mal.git] / ps / step0_repl.ps
index 325392f..b7c2f17 100644 (file)
@@ -1,4 +1,6 @@
 % read
+/_readline { print flush (%stdin) (r) file 1024 string readline } def
+
 /READ {
     % just "return" the input string
     /str exch def
 
 
 % repl
-/REP {
-    READ (stub env) EVAL PRINT
-} def
-
-/stdin (%stdin) (r) file def 
-
-{ % loop
-    (user> ) print flush
-
-    %(%lineedit) (r) file 99 string readline
-    stdin 99 string readline
+/REP { READ (stub env) EVAL PRINT } def
 
+% repl loop
+{ %loop
+    (user> ) _readline
     not { exit } if  % exit if EOF
 
-    %(\ngot line: ) print dup print (\n) print flush
     REP print (\n) print
 } bind loop