aol / cyclops-integration

Home of the cyclops integration modules : support for Scala, Clojure, RxJava (1+2), Reactor, FunctionalJava, Guava, Dexx & Vavr
http://cyclops-react.io
MIT License
442 stars 51 forks source link

Operator interop between cyclops-react, Reactor and RxJava #277

Closed johnmcclean closed 7 years ago

johnmcclean commented 7 years ago
ReactiveSeq.of(1,2,3)
                .to(lift(new Observable.Operator<Integer,Integer>(){

                    @Override
                    public Subscriber<? super Integer> call(Subscriber<? super Integer> subscriber) {
                        return subscriber; // operator code
                    }
                            }))
                   .map(i->i+1)
                   .to(observable(o->o.buffer(10)));

And

 ReactiveSeq.of(1,2,3)
                .to(flux(f->f.buffer(publisher))
                .map(i->i*2);

And vice versa

 Flux.just(1,2,3)
     .to(seq(f->f.sliding(1,2))
     .map(i->i*2);
johnmcclean commented 7 years ago

released