title: Processing Set of Sets and return a flat Iterable
body: <pre><code>val input=Set(Set("a","b"),Set("b","c"))
  </code></pre>
  
  <p>I want this:</p>
  
  <pre><code>Map("a"-&gt;1,"b"-&gt;2,"c"-&gt;1)
  </code></pre>
  
  <p>What is the best functional approach for implementing such functionality?
  Using yield keyword results in nested Iterables:</p>
  
  <pre><code>output = for(firstlevel&lt;-input) yield for(item&lt;-firstlevel) yield item
  </code></pre>