Haxe: update README, fix macro eval, add conj.
[jackhill/mal.git] / d / step0_repl.d
1 import std.stdio;
2 import std.string;
3 import readline;
4
5 string READ(string str)
6 {
7 return str;
8 }
9
10 string EVAL(string ast)
11 {
12 return ast;
13 }
14
15 string PRINT(string ast)
16 {
17 return ast;
18 }
19
20 string rep(string str)
21 {
22 return PRINT(EVAL(READ(str)));
23 }
24
25 void main()
26 {
27 for (;;)
28 {
29 string line = _readline("user> ");
30 if (line is null) break;
31 if (line.length == 0) continue;
32 writeln(rep(line));
33 }
34 writeln("");
35 }