diff --git a/codewars/ocaml/reduce-but-grow/main.ml b/codewars/ocaml/reduce-but-grow/main.ml new file mode 100644 index 0000000..b8a436e --- /dev/null +++ b/codewars/ocaml/reduce-but-grow/main.ml @@ -0,0 +1,4 @@ +let rec grow (xs: int list): int = + match xs with + | [] -> 1 + | x :: v -> x * (grow v);;