I tried Google search and could not find a decent forall example. What does it do? Why does it take a boolean function?
forall
Please point me to a reference (exce
A quick example of how you can play with this function using a Scala script.
Scala
create a myScript.scala file with
myScript.scala
println(args.forall(p => (p.equals("a"))))
and call it with
scala myScript.scala a a a // true scala myScript.scala a b c // false