filter method

Map<K, V> filter(
  1. bool test(
    1. V value
    )
)

Returns a new Map containing all the elements of this Map where the value satisfies test.

Implementation

Map<K, V> filter(bool Function(V value) test) => {
      for (var MapEntry(:key, :value) in entries)
        if (test(value)) key: value
    };