I am asking a very basic question which confused me recently. I want to write a Scala For expression to do something like the following:
for (i <- expr1)
You can not. The for(expr; if) construct just filter the element that must be handled in the loop.