src/main/java/io/reactivex/Flowable.java
@CheckReturnValue
    @BackpressureSupport(BackpressureKind.FULL)
    @SchedulerSupport(SchedulerSupport.NONE)
    public static <T, S> Flowable<T> generate(Callable<S> initialState, BiFunction<S, Emitter<T>, S> generator) {
        return generate(initialState, generator, Functions.emptyConsumer());
    }
@CheckReturnValue
    @BackpressureSupport(BackpressureKind.FULL)
    @SchedulerSupport(SchedulerSupport.NONE)
    public static <T, S> Flowable<T> generate(Callable<S> initialState, BiFunction<S, Emitter<T>, S> generator) {
        return generate(initialState, generator, Functions.emptyConsumer());
    }
Returns a cold, synchronous, stateful and backpressure-aware generator of values.
<p>
Note that the {@link Emitter#onNext}, {@link Emitter#onError} and
{@link Emitter#onComplete} methods provided to the function via the {@link Emitter} instance should be called synchronously,
never concurrently and only while the function body is executing. Calling them from multiple threads
or outside the function call is not supported and leads to an undefined behavior.
<dl>
<dt><b>Backpressure:</b></dt>
<dd>The operator honors downstream backpressure.</dd>
<dt><b>Scheduler:</b></dt>
<dd>{@code generate} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>

@param <S> the type of the per-Subscriber state
@param <T> the generated value type
@param initialState the Callable to generate the initial state for each Subscriber
@param generator the Function called with the current state whenever a particular downstream Subscriber has
requested a value. The callback then should call {@code onNext}, {@code onError} or
{@code onComplete} to signal a value or a terminal event and should return a (new) state for
the next invocation. Signaling multiple {@code onNext}
in a call will make the operator signal {@code IllegalStateException}.
@return the new Flowable instance