code: public static <R> Res<R> res(CloseFunction<R> closeFunction, R resource) {
      return new Res<>(closeFunction, resource);
    }
docs: Creates a new {@link Res} instance.
  
  @param closeFunction the function for releasing the resource
  @param resource the resource instance
  @param <R> the resource type
  @return