The current implementation of PersistentMap does not override Iterable methods like map, where and expand.
A client of PersistentMap that calls myPersistentMap.where((pair) => ...); is clearly expecting another PersistentMap as return, but he gets an Iterable<Pair<K, V>> instead.
The current implementation of
PersistentMapdoes not overrideIterablemethods likemap,whereandexpand.A client of
PersistentMapthat callsmyPersistentMap.where((pair) => ...);is clearly expecting anotherPersistentMapas return, but he gets anIterable<Pair<K, V>>instead.