ZIO<R, E, A>.envWithZIO constructor

ZIO<R, E, A>.envWithZIO(
  1. ZIO<NoEnv, E, A> f(
    1. R env
    )
)

Retrieve the current environment of the ZIO and pass it to the given function, returning the result of the resulting ZIO.

Implementation

factory ZIO.envWithZIO(ZIO<NoEnv, E, A> Function(R env) f) =>
    ZIO.from((ctx) => f(ctx.env).unsafeRun(ctx.noEnv));