Advertisement
Guest User

Untitled

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