Selection
function select_kth(s, k) = let pivot = s[#s/2]; les = {e in s | e < pivot} in if (k < #les) then select_kth(les, k) else let grt = {e in s | e > pivot} in if (k >= #s - #grt) then select_kth(grt, k - (#s - #grt)) else pivot;For the selection benchmarks, was the integer index vector , and was one third of the length of .