fix atom interactions and unfuck execution speed
[jackhill/mal.git] / jq / step0_repl.jq
1 include "utils";
2
3 def read_line:
4 . as $in
5 | label $top
6 | _readline;
7
8 def READ:
9 .;
10
11 def EVAL:
12 .;
13
14 def PRINT:
15 .;
16
17 def rep:
18 READ | EVAL | PRINT | _print;
19
20 def repl_:
21 ("user> " | _print) |
22 (read_line | rep);
23
24 def repl:
25 while(true; repl_);
26
27 repl