So far, I have a little code snippet that searches for the minimum value in a list
let sec_small lst =
let min_helper min curr =
if (min < curr) then min
else curr
in
List.fold_left min_helper (List.hd lst) lst
Which is a bit of code that returns the minimum value of a list. I'm just wondering, how should I proceed to make it so that I can look for the second smallest element of a list?