class Mobius {

  public static <M, E, F> MobiusLoop.Builder<M, E, F> loop(
      Update<M, E, F> update, Connectable<F, E> effectHandler) {

    //noinspection unchecked
    return new Builder<>(
        update,
        effectHandler,
        null,
        (Connectable<M, E>) NOOP_EVENT_SOURCE,
        (MobiusLoop.Logger<M, E, F>) NOOP_LOGGER,
        new Producer<WorkRunner>() {
          @Nonnull
          @Override
          public WorkRunner get() {
            return WorkRunners.from(Executors.newSingleThreadExecutor(Builder.THREAD_FACTORY));
          }
        },
        new Producer<WorkRunner>() {
          @Nonnull
          @Override
          public WorkRunner get() {
            return WorkRunners.from(Executors.newCachedThreadPool(Builder.THREAD_FACTORY));
          }
        });
  }

  private  Mobius();

}