I see an example in the official site:
fun main(args : Array<String>) { args filter {it.length() > 0} foreach {print("Hello, $it!")} }
But when I copied it to idea, it reports that foreach is a unresolved reference.
foreach
What's the right code?