O'Reilly logo

Learning Reactive Programming with Java 8 by Nickolay Tsvetinov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Accumulating data

The scan(Func2) operator takes a function with two arguments as a parameter. Its result is an Observable instance. The first item, emitted by the result of the scan() method, is the first item of the source Observable instance. The second item emitted is created by applying the function that was passed to the scan() method on the previous item emitted by the result Observable instance and the second item, emitted by the source Observable instance. The third item, emitted by the scan() method result, is created by applying the function, passed to the scan() method to the previous item, emitted by it and the third item emitted by the source Observable instance. This pattern continues in order to create the rest of the sequence ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required