codewars: solve 'reduce but grow' challenge
This commit is contained in:
parent
782d4a8ac8
commit
ec8417e0b0
1 changed files with 4 additions and 0 deletions
4
codewars/ocaml/reduce-but-grow/main.ml
Normal file
4
codewars/ocaml/reduce-but-grow/main.ml
Normal file
|
@ -0,0 +1,4 @@
|
|||
let rec grow (xs: int list): int =
|
||||
match xs with
|
||||
| [] -> 1
|
||||
| x :: v -> x * (grow v);;
|
Loading…
Reference in a new issue