Added Semigroup and Monoid instances for ConcurrentlyE. They work by returning either the combination of the successes or the first failure. When the error type is Void—that is, impossible—they are equivalent to those of normal Concurrently.
The Monoid / Applicative instances for ConcurrentlyE can be useful to solve tasks like this one (taken from Reddit):
I wonder how I could evaluate a list "xs :: [IO (Maybe Int)]" in parallel and return just the first element which returns a "Just result" value after evaluation?
Added
Semigroup
andMonoid
instances forConcurrentlyE
. They work by returning either the combination of the successes or the first failure. When the error type isVoid
—that is, impossible—they are equivalent to those of normalConcurrently
.The
Monoid
/Applicative
instances forConcurrentlyE
can be useful to solve tasks like this one (taken from Reddit):