I have List<T>, I need to reduce it using BiFunction<R, T, Mono<R>> aggregator.
So I need to chain those monos (Mono<R>)
How this can be done using project reactor?
UPDATE:
For example, I have a list with item1, item2 etc...
I have a function Mono<R> reduce(T item, R acc)
I need something like this: reduce(item1, startAcc).flatMap(acc -> reduce(item2, acc)).flatMap(acc -> reduce(item3, acc)) etc.
I can implement this using recursion, but I get StackOverflowError if the list is long enough
