Skip to content

fix typos in yield.md #1713

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
8 changes: 4 additions & 4 deletions _overviews/FAQ/yield.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ is translated into

#### Example 5

When pattern matching is used in for comprehensions on objects which do not
When pattern matching is used in for-comprehensions on objects which do not
implement `filter` or `withFilter` compilation fails with the following error

value withFilter is not a member of ...

That it because, for example, the following statement
That is because, for example, the following statement

for((a, b) <- c) yield {...}

Expand All @@ -79,10 +79,10 @@ is translated into
c.withFilter{
case (a, b) => true
case _ => false
}.map{case (a, b) => {...}
}.map{case (a, b) => {...}}

where the `withFilter` ensures that the pattern in the subsequent function is
always satisfied
always satisfied.

Clarity
----------------------------------
Expand Down