Commit | Line | Data |
---|---|---|
1c358979 PS |
1 | module REPL |
2 | let read input = | |
3 | input | |
4 | ||
5 | let eval ast = | |
6 | ast | |
7 | ||
8 | let print v = | |
9 | printfn "=> %A" v | |
10 | ||
11 | let rep input = | |
12 | input | |
13 | |> read | |
14 | |> eval | |
15 | ||
16 | ||
17 | [<EntryPoint>] | |
18 | let rec main args = | |
ed3a12f5 | 19 | match System.Console.ReadLine() with |
1c358979 PS |
20 | | null -> 0 |
21 | | input -> | |
22 | rep input | |
23 | main args |