Every Scala for loop starts with a generator, a source of data. For loops have side effects like printing, while for/yield expressions yield values.
For/yield combos are expressions that yield values in Scala. Multiple generators can be used, and guards (if conditions) can be added for more specific results.
Collection
[
|
...
]