An enumerator is either a generator which introduces new variables, or it is a filter.
If you want to change selection, open document below and click on "Move attachment"
Sequence Comprehensions - Scala Documentation
Scala offers a lightweight notation for expressing sequence comprehensions. Comprehensions have the form for (enumerators) yield e, where enumerators refers to a semicolon-separated list of enumerators. <span>An enumerator is either a generator which introduces new variables, or it is a filter. A comprehension evaluates the body e for each binding generated by the enumerators and returns a sequence of these values.
Here is an example:
object ComprehensionTest1 extends App {
Summary
status
not read
reprioritisations
last reprioritisation on
suggested re-reading day
started reading on
finished reading on
Details
Discussion
Do you want to join discussion? Click here to log in or create user.