code: public static <T, S> Ix<T> generate(IxSupplier<S> stateSupplier, IxFunction2<S, IxEmitter<T>, S> nextSupplier, IxConsumer<? super S> stateDisposer) {
          return new IxGenerate<T, S>(nullCheck(stateSupplier, "stateSupplier is null"),
                  nullCheck(nextSupplier, "nextSupplier is null"), nullCheck(stateDisposer, "stateDisposer is null"));
      }
docs: Calls the given function (with per-iterator state) to generate a value or terminate
  whenever the next() is called on the resulting Ix.iterator().
  <p>
  The result's iterator() doesn't support remove().
  <p>
  The action may call {@code onNext} at most once to signal the next value per action invocation.
  The {@code onCompleted} should be called to indicate no further values will be generated (may be
  called with an onNext in the same action invocation). Calling {@code onError} will immediately
  throw the given exception (as is if it's a RuntimeException or Error; or wrapped into a RuntimeException).
  <p>
  Note that since there is no direct way to cancel an Iterator, the stateDisposer is only invoked
  when the nextSupplier calls a terminal method.
  @param <T> the value type
  @param <S> the state type supplied to and returned by the nextSupplier function
  @param stateSupplier the function that returns a state for each invocation of iterator()
  @param nextSupplier the action called with an IxEmitter API to receive value, not null
  @param stateDisposer the action called when the nextSupplier signals an {@code onError} or {@code onCompleted}.
  @return the new Ix instance
  @throws NullPointerException if stateSupplier, nextSupplier or stateDisposer is null
  @since 1.0