Skip to content

Commit a02b6c9

Browse files
author
Ali Hong
committed
Link to the book for clarification of generator and guard control structures
1 parent c9d27ca commit a02b6c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

_tour/for-comprehensions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ redirect_from:
1212
- "/tutorials/tour/sequence-comprehensions.html"
1313
---
1414

15-
Scala offers a lightweight notation for expressing _sequence comprehensions_. Comprehensions have the form `for (enumerators) yield e`, where `enumerators` refers to a list of enumerators. An _enumerator_ is either a generator which introduces new variables, or it is a guard. A comprehension evaluates the body `e` for each binding generated by the enumerators and returns a sequence of these values.
15+
Scala offers a lightweight notation for expressing _sequence comprehensions_. Comprehensions have the form `for (enumerators) yield e`, where `enumerators` refers to a list of enumerators. An _enumerator_ is either a generator, or it is a guard (see: [Control Structures](/scala3/book/control-structures.html)). A comprehension evaluates the body `e` for each binding generated by the enumerators and returns a sequence of these values.
1616

1717
Here's an example:
1818

0 commit comments

Comments
 (0)