codewars: solve 'sum of positive' challenge
This commit is contained in:
parent
9951704e30
commit
87d77ce5b2
1 changed files with 2 additions and 0 deletions
2
codewars/ocaml/sum-of-positive/main.ml
Normal file
2
codewars/ocaml/sum-of-positive/main.ml
Normal file
|
@ -0,0 +1,2 @@
|
|||
let positive_sum ls =
|
||||
List.fold_left ( + ) 0 (List.filter (fun x -> x > 0) ls);;
|
Loading…
Reference in a new issue