title: How to compose a Single<T> with multiple futures
body: <p>Assume I have below code:</p>
  
  <pre><code>    public Single&lt;C&gt; gen(String input1, String input2) {
  
      //TODO
      }
  
      private Future&lt;A&gt; remote1(final String input1) {
  
      }
  
      private Future&lt;B&gt; remote2(final String input2) {
  
      }
  </code></pre>
  
  <p>and I can use A + B to create C, like new C(A a, B b).</p>
  
  <p>How am I supposed to write the code with remote1 and remote2 run in parallel.</p>
  
  <p>I'm not sure whether my way is correct or efficient:</p>
  
  <pre><code>    Flowable&lt;A&gt; f1 = Flowable.fromFuture(remote1(input1));
      Flowable&lt;B&gt; f2 = Flowable.fromFuture(remote2(input2));
  
      Single&lt;C&gt; result = Flowable.combineLatest(f1, f2, new BiFunction&lt;A, B, C&gt;(){
  
          @Override
          public C apply(A a, B b) throws Exception {
              return new C(a, b);
          }}).firstOrError();
  </code></pre>
  
  <p>Thanks</p>
  
  <p>Leon</p>