Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let minmaxx l = List.fold_left (function a->function x-> if x<(fst a) then (x,(snd a))
- else if (snd a)<x then ((fst a),x)
- else a) ((List.hd l),(List.hd l)) l;;
- minmaxx [1;2;3;4;5;-300];;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement