class ZIOResource implements AutoCloseable {

  public <R, B> ZIO<R, E, B> apply(Function1<? super A, ? extends ZIO<R, E, ? extends B>> use) {
    return resource.map(use.andThen(ZIOOf::<R, E, B>narrowK)).fold(ZIO::raiseError, identity());
  }

    ZIOResource(Either<E, ? extends A> resource, Consumer1<? super A> release);

}