src/main/java/io/reactivex/Flowable.java
@CheckReturnValue
    @BackpressureSupport(BackpressureKind.SPECIAL)
    @SchedulerSupport(SchedulerSupport.NONE)
    public final <R> R to(Function<? super Flowable<T>, R> converter) {
        try {
            return ObjectHelper.requireNonNull(converter, "converter is null").apply(this);
        } catch (Throwable ex) {
            Exceptions.throwIfFatal(ex);
            throw ExceptionHelper.wrapOrThrow(ex);
        }
    }
@CheckReturnValue
    @BackpressureSupport(BackpressureKind.SPECIAL)
    @SchedulerSupport(SchedulerSupport.NONE)
    public final <R> R to(Function<? super Flowable<T>, R> converter) {
        try {
            return ObjectHelper.requireNonNull(converter, "converter is null").apply(this);
        } catch (Throwable ex) {
            Exceptions.throwIfFatal(ex);
            throw ExceptionHelper.wrapOrThrow(ex);
        }
    }
Calls the specified converter function during assembly time and returns its resulting value.
<p>
This allows fluent conversion to any other type.
<dl>
<dt><b>Backpressure:</b></dt>
<dd>The backpressure behavior depends on what happens in the {@code converter} function.</dd>
<dt><b>Scheduler:</b></dt>
<dd>{@code to} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>
@param <R> the resulting object type
@param converter the function that receives the current Flowable instance and returns a value
@return the value returned by the function