smallest method

List<T> smallest(
  1. Iterable<T> iterable,
  2. int k
)

Returns a list of the k smallest elements from the given iterable according to this ordering, in order from smallest to largest.

Implementation

List<T> smallest(Iterable<T> iterable, int k) =>
    reversed.largest(iterable, k);