code: public static <I, X extends Throwable> ThrowingConsumer<Stream<I>, X> forEach(final ThrowingConsumer<I, X> consumer) {
          return input -> {
              if (input == null) {
                  return;
              }
  
              try {
                  input.forEach(consumer);
              } finally {
                  input.close();
              }
          };
      }
docs: Creates {@link ThrowingConsumer stream consumer} for given {@link ThrowingConsumer element consumer}. Commonly
  used to wrap a single entity consumer function in a stream consumer function as follows:
  
  <pre>
  on(...).call(streamOf(...), forEach(System.out::println))
  </pre>
  
  @param <I> generic stream element type
  @param <X> generic exception type
  @param consumer element consumer function.
  @return stream consumer function.