We have ```parZip( { … }, { … }, )``` I'd ...
# arrow-contributors
c
We have
Copy code
parZip(
    { … },
    { … },
)
I'd be interested in having
Copy code
parAny(
    { … → true },
    { … → false },
) // Boolean

parNone(…)

parAll(…)
that are correctly configured to cancel all other checks once boolean logic determines the result. What do you think?
s
We can do
parZip
with a DSL as well 🙃 I have a prototype on a branch, but have been lacking time since KotlinConf
Oh nevermind, that's parAccumulate
The DSL version of parZip is awaitAll
c
awaitAll
is untyped, no? But yeah, the main issue with this proposal is that it adds 3 new 22-arity methods 😕
s
awaitAll { }
is to
parZip
what
accumulate { }
is to
ziprOrAccumulate
if that's what you meant with untyped
Within
awaitAll
any call to
await
is equivalent to call
awaitAll
on the created Jobs within the scope. So it serves the same purpose as
parZip
.
c
Actually, since in my case all arguments must be
Boolean
, this may be imported as
Copy code
List<Deferred<Boolean>>.any(): Boolean
but that seems easy to misunderstand
a
I would rather find a way to shortcut a computation within the
par
block
☝️ 1
c
I'm not aware of a
par
DSL?
a
sorry,
parZip
😅
👍 1