class Task implements TaskOf<A>, Recoverable {

  public static <A extends AutoCloseable, B> Task<B> bracket(
      Task<? extends A> acquire, Function1<? super A, ? extends Task<? extends B>> use) {
    return new Task<>(ZIO.bracket(acquire.instance, resource -> use.andThen(TaskOf::narrowK).apply(resource).instance));
  }

    Task(ZIO<Nothing, Throwable, A> value);

}