I see there is a `traverseEither` for `Map`, is th...
# arrow
b
I see there is a
traverseEither
for
Map
, is there a
parTraverseEither
? This is what I have right now:
Copy code
val items = // Map<K,V>
val newUrls = items.entries
  .parTraverseEither { (key, value) -> doWork(key, value).map { Pair(key, it) } }
  .map { it.associate { (first, second) -> first to second } }.bind()
s
Hey @Brad M, This is currently not available for
Map
but we can add it for sure 🙂 If you're interested in contributing it, I'd be happy to help! I think you can write a version for it without having to
Pair
twice to get it back into the map by combining the
traverseEither
implementation ans
parTraverseEither
implementation.
Otherwise, feel free to make a ticket so we can plan it for 1.0.0 🙂