cheesebot/ocaml/shell.ml

15 lines
260 B
OCaml
Raw Normal View History

open Str
let () =
try
while true do
print_string "> ";
let line = read_line () in
match Evaluate.evaluate line with
| Some answer -> print_endline answer
| _ -> ()
done
with
End_of_file -> print_endline "Bye!";;