From ec8417e0b0ecc3c7184c001bcf962279b70eb6f3 Mon Sep 17 00:00:00 2001 From: Ivan Reshetnikov Date: Tue, 20 Feb 2024 01:10:14 +0500 Subject: [PATCH] codewars: solve 'reduce but grow' challenge --- codewars/ocaml/reduce-but-grow/main.ml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 codewars/ocaml/reduce-but-grow/main.ml 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);;