Created
October 31, 2016 21:40
-
-
Save valexey/481efb44152724c3fd2e1a013910f07e 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 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