Hi! Is there a way to do `parMapNotNull { }`?
# arrow
d
Hi! Is there a way to do
parMapNotNull { }
?
r
Hi @dave08 there isn't right now, you'd have to use
parMap { ... }.filterNotNull()
but I think it's reasonable to suggest we add it. I added this after I read your message for discussion https://github.com/arrow-kt/arrow/pull/3110
👍🏼 1
Also added:
We should probably consider what other extensions from
Iterable
can offer
par
variants. I guess many can be achieved through
parTraverse
, but that name is not idiomatic to what Kotlin users are used to in the
Iterable
extensions.
d
Thanks for creating the issue! I was also thinking of some kind of combination between parMap { parZip { } } (maybe that's parTraverse?) that allows running concurrent functions to build list elements concurrently...
(or should I just use parMap { parZip { } }, will that be problematic to nest them?)
r
I don't think there will be an issue nesting those, if there is that would be a bug.
👍🏼 1
👍🏾 1
parTraverse is what we call now
parMap
it used to be called parTraverse and is now deprecated.
👍 1