Implement step 3
[jackhill/mal.git] / chuck / step0_repl.ck
CommitLineData
4abd73a6
VS
1fun string READ(string input)
2{
3 return input;
4}
5
6fun string EVAL(string input)
7{
8 return input;
9}
10
11fun string PRINT(string input)
12{
13 return input;
14}
15
16fun string rep(string input)
17{
18 return input => READ => EVAL => PRINT;
19}
20
21fun void main()
22{
23 ConsoleInput stdin;
24 string input;
25
26 while( true )
27 {
28 stdin.prompt("user>") => now;
29 stdin.getLine() => input;
30 chout <= rep(input) + "\n";
31 }
32}
33
34main();