You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently it appears impossible to use eachWhere with a map. It is formally possible to invoke eachWhere on a Map[A, B], but it would result in this method using Iterable[(A, B)] as the output for setting the value, which causes type mismatch errors.
My use case is as follows. I have a map like Map[String, SomeValue] and I need to modify only those entries whose key satisfies some predicate:
Currently it appears impossible to use
eachWhere
with a map. It is formally possible to invokeeachWhere
on aMap[A, B]
, but it would result in this method usingIterable[(A, B)]
as the output for setting the value, which causes type mismatch errors.My use case is as follows. I have a map like
Map[String, SomeValue]
and I need to modify only those entries whose key satisfies some predicate:Apparently there is no simple way to do it now. Having an ability to use
eachWhere
on a map would solve the issue.The text was updated successfully, but these errors were encountered: