@Test public void async(){ assertThat(IO.fromPublisher(Future.of(()->10, ex)) .map(i->i+1) .run().orElse(-1),equalTo(11)); }
@Override public <R> IO<R> map(Function<? super T, ? extends R> s) { return new IOMonad<W,R>(monad,monad.map(s,pub),toPublsher,fromPublsher); }
IOMonad implements IO<T> { @Override public <R> IO<R> map(Function<? super T, ? extends R> s) { return new IOMonad<W,R>(monad,monad.map(s,pub),toPublsher,fromPublsher); } }
IOMonad implements IO<T> { @Override public <R> IO<R> map(Function<? super T, ? extends R> s) { return new IOMonad<W,R>(monad,monad.map(s,pub),toPublsher,fromPublsher); }  }
IOMonad implements IO<T> { @Override public <R> IO<R> map(Function<? super T, ? extends R> s) { return new IOMonad<W,R>(monad,monad.map(s,pub),toPublsher,fromPublsher); }  static IOMonad<W,T> ioMonad(Monad<W> monad, Higher<W,T> hkt, ToPublsher<W> to, FromPublsher<W> from); static IOMonad<W,T> ioMonad(Converter<W>  converter,Higher<W,T> hkt); @Override IO<R> map(Function<? super T, ? extends R> s); @Override IO<R> flatMap(Function<? super T, IO<? extends R>> s); @Override IO<R> mergeMap(int maxConcurrency, Function<? super T, Publisher<? extends R>> s); @Override Publisher<T> publisher(); String toString(); }
IOMonad implements IO<T> { @Override public <R> IO<R> map(Function<? super T, ? extends R> s) { return new IOMonad<W,R>(monad,monad.map(s,pub),toPublsher,fromPublsher); }  static IOMonad<W,T> ioMonad(Monad<W> monad, Higher<W,T> hkt, ToPublsher<W> to, FromPublsher<W> from); static IOMonad<W,T> ioMonad(Converter<W>  converter,Higher<W,T> hkt); @Override IO<R> map(Function<? super T, ? extends R> s); @Override IO<R> flatMap(Function<? super T, IO<? extends R>> s); @Override IO<R> mergeMap(int maxConcurrency, Function<? super T, Publisher<? extends R>> s); @Override Publisher<T> publisher(); String toString(); static Converter<reactiveSeq> reactiveSeqConverter; static Converter<future> futureConverter; }