when count is small, the original array is not modified. when count is large the original array is reduced by count elements. the array should either be mutated or not, regardless of count imo.
list.length == 100
heap.nsmallest(list,1) //list not modified at all list.length == 100
heap.nsmallest(list,11) //list modified, list.length == 89
when count is small, the original array is not modified. when count is large the original array is reduced by count elements. the array should either be mutated or not, regardless of count imo.