title: In RxJava, how to pass a variable along when chaining observables?
body: <p>I am chaining async operations using RxJava, and I'd like to pass some variable downstream:</p>
  
  <pre><code>Observable
     .from(modifications)
     .flatmap( (data1) -&gt; { return op1(data1); })
     ...
     .flatmap( (data2) -&gt; { 
         // How to access data1 here ?
         return op2(data2);
     })
  </code></pre>
  
  <p>It seems like a common pattern but I couldn't find information about it.</p>