These are chat archives for ReactiveX/RxJava

19th
May 2017
Heikki Vesalainen
@hvesalai
May 19 2017 10:04
Any drawback in doing this:
Flowable<Long> fib(Long i, Long j) {
  return Flowable.concat(Flowable.just(i), Flowable.defer(() -> fib(j, i+j)));
}
Heikki Vesalainen
@hvesalai
May 19 2017 17:56
Is there a way to implement static <T> Pair<Flowable<T>, Flowable<T>> split(Flowable<T> source, long at), i.e the first at elements to the first Flowable and the rest to the next Flowable? So that it all subscribes to the source flowable only once.
If I do simply new Pair(source.take(at), source.skip(at)), wouldn't that subscribe to source twise?