Created
May 5, 2011 15:00
-
-
Save cmcbride/957200 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* find min/max of an array, type generic *) | |
let minmax a = | |
let start = a.(0), a.(0) in | |
let mm t e = (min (fst t) e , max (snd t) e ) in | |
Array.fold_left mm start a | |
;; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment