Created
October 31, 2016 21:40
-
-
Save valexey/d3ebab78878a144968a1d7f1e180b6cd 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
let min_index a = | |
let rec min i m = | |
let m = if a.(i) < a.(m) then i else m in | |
if (Array.length a) == (i+1) then | |
m | |
else | |
min(i+1) m | |
in | |
Index (min 0 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment