Scala Non-Tail Recursive Solution : <p>I have this tail-recursive function that returns true if any element in the list is a <code>Boolean</code> value.</p>

<pre><code>def anyBoolTailRec[A](test: A=&gt; Boolean, a: List[A]): Boolean = a match {
    case Nil =&gt; false
    case h :: t if(!test(h)) =&gt; anyBoolTailRec(test, t)
    case _ =&gt; true
}
</code></pre>

<p>The test parameter is just a function to check the values type:</p>

<pre><code>def isBool(i: Any) = i match {
    case _: Boolean =&gt; true
    case _    =&gt; false
}
</code></pre>

<p>The function is called like this:</p>

<pre><code>anyBoolTailRec(isBool, List(1, 2, "hi", "test", false))
&gt;&gt;&gt; true
</code></pre>

<p><strong>Question:</strong> How can I turn this tail recursive solution into a non-tail recursive solution? Since we're returning Booleans I'm not sure how to do it.</p>

<p><em>Note:</em> I am aware tail-recursive solutions are better in Scala.</p>
