Medium Advanced Reactive Patterns
Running Total with Scan
Traducción al español en progresoEl contenido detallado de esta lección aún se está traduciendo. Mientras tanto, se muestra en inglés.
Create a Flux of 1, 2, 3, 4, 5 and use scan() to compute a running total. Print each intermediate sum.
scan() is like reduce() but emits each intermediate accumulation.
Esperado
1 3 6 10 15
Main.kt