From c37eb1088eba0ce63e907002c866ebc4566ed3d2 Mon Sep 17 00:00:00 2001 From: Fabien Freling Date: Fri, 25 Oct 2013 14:21:05 +0200 Subject: [PATCH] Add OCaml parrot. --- ocaml/main.ml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 ocaml/main.ml diff --git a/ocaml/main.ml b/ocaml/main.ml new file mode 100644 index 0000000..69c9b71 --- /dev/null +++ b/ocaml/main.ml @@ -0,0 +1,12 @@ +let evaluate str = + str;; + +try + while true do + print_string "> "; + let line = read_line () in + let answer = evaluate line in + print_endline answer + done; +with + End_of_file -> print_endline "Bye!";;