flatMapEnv<B> method
A variant of flatMap that also provides the environment to the given function.
Implementation
ZIO<R, E, B> flatMapEnv<B>(
ZIO<R, E, B> Function(A _, R env) f,
) =>
ZIO.from(
(ctx) => unsafeRun(ctx).then(
(ea) => ea.match(
(e) => Either.left(e),
(a) => f(a, ctx.env).unsafeRun(ctx),
),
),
);