filterValues method
Returns a map containing all key-value pairs with values matching the given predicate
.
The returned map preserves the entry iteration order of the original map.
Implementation
KtMap<K, V> filterValues(bool Function(V) predicate) {
final result = linkedMapFrom<K, V>();
for (final entry in iter) {
if (predicate(entry.value)) {
result.put(entry.key, entry.value);
}
}
return result;
}