/**
* Evaluate each effect in the structure in parallel, collecting the
* the successful values and discarding the empty cases.
*
* @tsplus static effect/core/io/Effect.Ops collectPar
*/
export function collectPar(
as: Collection,
f: (a: A) => Effect, B>
): Effect> {
return Effect.forEachPar(as, (a) => f(a).unsome).map((chunk) => chunk.compact)
}