title: How to check whether all elements in list are numeric?
body: <p>I have a data in this form, this is basically a huge data.</p>
  
  <pre><code>val data: Array[(Int, Iterable[String])] =
    Array(
      (34,List("sdkfj",7, 2, 5, 3, 1, 9, 2, 1, 4)),
      (4,List(7, 14, 4, 5, 11, 9, 5, 4, 1))
    )
  </code></pre>
  
  <p>I want to apply a function say <code>isNumeric</code> on the iterable items which should return me the output in the following way </p>
  
  <pre><code>Array((34,false), (4,true))
  </code></pre>
  
  <p>Basically, I want a <code>false</code> if any element in the list is not numeric, otherwise <code>true</code>.</p>
  
  <p>I have tried this function </p>
  
  <pre><code>def isNumeric(input: String): Boolean = input.forall(_.isDigit)
  </code></pre>
  
  <p>But in this case I get a list of booleans whereas I want a single boolean result for the entire list.</p>