I am trying to figure out how to use this signature of .zip
public static <R> Mono<R> zip(final Iterable<? extends Mono<?>> monos, Function<? super Object[], ? extends R> combinator) {
return onAssembly(new MonoZip<>(false, combinator, monos));
}
I have multiple monos create from webclient request that I would like zip up. Supplying each mono separately like so works:
Mono.zip(m1, m2, m3, (a, b, c) -> { })
But if a List of monos like
List<Mono> monos = new ArrayList();
Mono.zip(monos, () -> {});
I get an error: List<Mono> is not compatible with Iterable<? extends Mono<?>>
Is it proper to attempt to use .zip is this manner and if so, how can I accomplish this.