title: RxJava2 zip two Flowables into one
body: <p>I am struggling to find any RxJava2 examples of zipping two Flowables into one.</p>
  
  <p>I am trying to modify <a href="https://github.com/ReactiveX/RxJava/blob/2.x/src/jmh/java/io/reactivex/parallel/ParallelPerf.java" rel="noreferrer">this test</a> to include something along the lines of </p>
  
  <pre><code>    Integer[] ints = new Integer[count];
      Integer[] moreints = new Integer[count];
      Arrays.fill(ints, 777);
      Arrays.fill(moreints, 777);
  
      Flowable&lt;Integer&gt; source = Flowable.fromArray(ints);
      Flowable&lt;Integer&gt; anothersource = Flowable.fromArray(moreints);
  
      Flowable&lt;Integer&gt; zippedsources = Flowable.zip(source, anothersource,
              new BiFunction&lt;Flowable&lt;Integer&gt;, Flowable&lt;Integer&gt;, Flowable&lt;Integer&gt;&gt;() {
  
                  @Override
                  public void apply(Flowable&lt;Integer&gt; arg0, Flowable&lt;Integer&gt; arg1) throws Exception {
                      return arg0.blockingFirst() + arg1.blockingLast();
                  }
  
      }).runOn(Schedulers.computation()).map(this).sequential();
  </code></pre>
  
  <p>Edit: I am trying to take an Integer from source and anothersource and add them up but it seems fundamentally different from the RxJava1 way of doing that ... I have tried a bunch of variations returning Integer, Publisher, Flowable and void but keep getting and error in Eclipse on the zip operator itself.</p>
  
  <p>I am unable to figure out what goes where in <code>.zip(Iterable&lt;? extends Publisher&lt;? extends T&gt;&gt;, Function&lt;? super Object[], ? extends R&gt;).</code> </p>