All pastes #2068765 Raw Edit

Stuff

public text v1 · immutable
#2068765 ·published 2011-05-25 03:57 UTC
rendered paste body
let rec get_smallest li curr_idx small_idx =  
    let end_idx = (List.length li) - 1 in 

    match curr_idx with 
        end_idx -> small_idx
        | _ ->  if li.[curr_idx] < li.[small_idx] then 
                    get_smallest li (curr_idx+1) curr_idx
                else 
                    get_smallest li (curr_idx+1) small_idx;;