title: Scala groupBy: Want array indices satisfying predicate, not array values
body: <pre><code>    val m = Array(10,20,30,30,50,60,70,80) groupBy ( s =&gt; s %30 == 0)
      m(true).map { kv =&gt; println(kv) }
  </code></pre>
  
  <p>prints the values 30, 30, 60</p>
  
  <p>I want the indices i.e. 2, 3, 5 to be printed.</p>
  
  <p>How do I go about this?</p>