What would be the most efficient way to take n smallest numbers from a sequence,
[ [1 2 3] [9 2 1] [2 3 4] [5 6 7] ]
I would like to take 2 smallest from the sequence based on the first item,
[1 2 3] [2 3 4]
currently I am sorting the whole list then taking first n items but that probably is not the most efficient way to go, it is a big list and I need to do this frequently.