fsharp: step5: Added tail call optimization.
[jackhill/mal.git] / fsharp / step0_repl.fs
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 |> print
16
17 [<EntryPoint>]
18 let rec main args =
19 match System.Console.ReadLine() with
20 | null -> 0
21 | input ->
22 rep input
23 main args