title: How to convert List<Mono<T>> to Mono<List<T>>?
body: <p>I have a method that returns <code>Mono&lt;Output&gt;</code>:</p>
  
  <pre><code>interface Processor {
    Mono&lt;Output&gt; process(Input input);
  }
  </code></pre>
  
  <p>And I want to execute this <code>processor</code> method for a collection:</p>
  
  <pre><code>List&lt;Input&gt; inputs = // get inputs
  Processor processor = // get processor
  List&lt;Mono&lt;Output&gt;&gt; outputs = inputs.stream().map(supplier::supply).collect(toList());
  </code></pre>
  
  <p>But instead of a <code>List&lt;Mono&lt;Output&gt;&gt;</code> I want to get <code>Mono&lt;List&lt;Output&gt;&gt;</code> that will contain aggregated results.</p>
  
  <p>I tried <code>reduce</code>, but the final result looks very clumsy:</p>
  
  <pre><code>Mono&lt;List&lt;Output&gt;&gt; result = inputs.stream().map(processor::process)
      .reduce(Mono.just(new ArrayList&lt;&gt;()),
          (monoListOfOutput, monoOfOutput) -&gt;
              monoListOfOutput.flatMap(list -&gt; monoOfOutput.map(output -&gt; {
                list.add(output);
                return list;
              })),
          (left, right) -&gt;
              left.flatMap(leftList -&gt; right.map(rightList -&gt; {
                leftList.addAll(rightList);
                return leftList;
              })));
  </code></pre>
  
  <p>Can I achieve this with less code?</p>