Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions _tour/for-comprehensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ num: 19
next-page: generic-classes
previous-page: extractor-objects

redirect_from: "/tutorials/tour/for-comprehensions.html"
redirect_from: "/tutorials/tour/sequence-comprehensions.html"
redirect_from:
- "/tutorials/tour/for-comprehensions.html"
- "/tutorials/tour/sequence-comprehensions.html"
---

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. 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.
Expand Down