collect<A> method

Iterable<A> collect<A>(
  1. Order<K> order,
  2. A compose(
    1. K key,
    2. V value
    )
)

Collect all the entries in this Map into an Iterable using compose, with the values ordered using order.

See also toSortedList.

Implementation

Iterable<A> collect<A>(Order<K> order, A Function(K key, V value) compose) =>
    toSortedList(order).map(
      (item) => compose(
        item.key,
        item.value,
      ),
    );