ZIO<R, E, A>.envWith constructor

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

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

Implementation

factory ZIO.envWith(A Function(R env) f) =>
    ZIO.from((ctx) => Either.right(f(ctx.env)));