title: Scala: flatten mixed set of sets (or lists or arrays)
body: <p>I have a Set which incorporates a combination of strings, and subSets of strings, like so:</p>
  
  <pre><code>val s = Set(brand1-_test, Set(brand-one, brand_one, brandone), brands-two, brandthree1, Set(brand-three2, brand_three2, brandthree2))
  </code></pre>
  
  <p>How do I flatten this so that I have one flat set of strings? <code>s.flatten</code> doesn't work with the following error:</p>
  
  <pre><code>error: No implicit view available from Object =&gt; scala.collection.GenTraversableOnce[B]
  </code></pre>
  
  <p>Neither does flatMap. What am I missing here? The Set could just as easily incorporate a subLists or subArrays (they are the result of a previous function), if that makes a difference.</p>