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/fib38.ml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 comparison/OCaml/fib38.ml (limited to 'comparison/OCaml/fib38.ml') diff --git a/comparison/OCaml/fib38.ml b/comparison/OCaml/fib38.ml new file mode 100644 index 0000000..2f7906d --- /dev/null +++ b/comparison/OCaml/fib38.ml @@ -0,0 +1,7 @@ +let rec fib n = + match n with + 0 -> 0 + | 1 -> 1 + | n -> fib(n-1) + fib (n-2) + +let () = print_int (fib 38); -- cgit v1.2.3