From 2385aacb1237295a4eacade285e6bc3b542ad06f Mon Sep 17 00:00:00 2001 From: Shinya Sato Date: Sat, 16 Apr 2022 20:25:55 +0900 Subject: Benchmarks for OCaml --- comparison/OCaml/ack3_11.ml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 comparison/OCaml/ack3_11.ml (limited to 'comparison/OCaml/ack3_11.ml') diff --git a/comparison/OCaml/ack3_11.ml b/comparison/OCaml/ack3_11.ml new file mode 100644 index 0000000..6d4cdce --- /dev/null +++ b/comparison/OCaml/ack3_11.ml @@ -0,0 +1,6 @@ +let rec ack m n = + if m==0 then n+1 + else if n==0 then ack (m-1) 1 + else ack (m-1) (ack m (n-1)) + +let () = print_int (ack 3 11); -- cgit v1.2.3