import { Effect, Either } from "effect"
const e1 = Effect.succeed("e1")
const e2 = Effect.fail("e2")
const e3 = Effect.succeed("e3")
Effect.all([e1, e2, e3], {
mode: "either",
}).pipe(
Effect.map((arr) => arr.filter(Either.isRight).map((x) => Either.isRight(x) ? x.right : null)),
Effect.runPromise
).then(console.log)
import { Effect, Either } from "effect"
const e1 = Effect.succeed("e1")
const e2 = Effect.fail("e2")
const e3 = Effect.succeed("e3")
Effect.all([e1, e2, e3], {
mode: "either",
}).pipe(
Effect.map((arr) => arr.filter(Either.isRight).map((x) => Either.isRight(x) ? x.right : null)),
Effect.runPromise
).then(console.log)