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.

What's the right code?

Edit
Report