class IOResource implements AutoCloseable {

  public <R> IO<R> apply(Function1<? super T, ? extends IO<? extends R>> use) {
    return use.andThen(IOOf::<R>narrowK).apply(resource);
  }

    IOResource(T resource, Consumer1<? super T> release);

}