Filter the for expression in an imperative style.

This code looks more familiar to programmers with an imperative
background. The imperative form, however, is only an option
because this particular for expression is executed for its
printing side-effects and results in the unit value ().
Filter the for expression in a functional style.

What makes this form most different from the imperative form is
that this expression can result in an interesting value,
a collection whose type is determined by the for expression's <-
clauses.
You can use multiple filters in a for expression.

This will only print files and not directories, for example.
You can do nested iteration within a single for expression.

If you add multiple <- clauses, you will get nested "loops". For
example, the for expression here has two nested loops. The outer
loop iterates through filesHere, and the inner loop iterates
through fileLines(file) for any file that ends with .scala.

If you use curly braces instead of parentheses to surround the
generators and filters, you can leave off the semicolons that
are otherwise needed inside of parentheses (where they are not
inferred).
You can make mid-stream assignments in for expressions.

Suppose trimming a file line were a non-trivially expensive
computation. You don't have to perform it more than once per
iteration, by assigning its result to a mid-stream value,
binding it to trimmed.  The trimmed value is introduced
and used just like a val.
You can produce new collections from generators using yield.

Each time the body of the for expression executes it produces
one value, in this case simply file. When the for expression
completes, the result will include all of the yielded values
contained in a single collection.
Use generators and filters to transform an Array[File] to an Array[Int].

For all the files in the current directory, of which end with .scala,
for all the lines in such files, if the trimmed lines contain "for",
yield the length of such lines.