Skip to content

TakeSmallest

Returns the n smallest elements from a list.

$ wo 'TakeSmallest[{3, 1, 4, 1, 5, 9, 2, 6}, 3]'
{1, 1, 2}
$ wo 'TakeSmallest[{5, 2, 8, 1}, 2]'
{1, 2}