title: Akka streams flattening Flows via
body: <p>Flows can be connected with <code>via</code> like:</p>
  
  <pre><code>def aToB: Flow[A, B, NotUsed] = { ??? }  
  def bToC: Flow[B, C, NotUsed] = { ??? }  
  def aToC: Flow[A, C, NotUsed] = { aToB.via(bToC) }  
  </code></pre>
  
  <p>I would like to do the equivalent of <code>flatMap</code>:</p>
  
  <pre><code>def aToSomeB: Flow[A, Some[B], NotUsed] = { ??? }  
  def aToSomeC: Flow[A, Some[C], NotUsed] = { aToSomeB.flatVia(bToC) }
  </code></pre>
  
  <p>Is there some built-in way to do <code>flatVia</code>? It seems like a common need for things like <code>Option</code> unwrapping and error flattening.</p>