Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let minBy predicate l =
- match l with
- | [] -> []
- | h :: t -> List.fold_left t ~init:h ~f:(fun a e ->
- if predicate e < predicate a then e else a)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement