mirror of
https://github.com/kanaka/mal.git
synced 2024-09-20 10:07:45 +03:00
24 lines
381 B
Forth
24 lines
381 B
Forth
module REPL
|
|
let read input =
|
|
input
|
|
|
|
let eval ast =
|
|
ast
|
|
|
|
let print v =
|
|
printfn "=> %A" v
|
|
|
|
let rep input =
|
|
input
|
|
|> read
|
|
|> eval
|
|
|> print
|
|
|
|
[<EntryPoint>]
|
|
let rec main args =
|
|
match System.Console.ReadLine() with
|
|
| null -> 0
|
|
| input ->
|
|
rep input
|
|
main args
|