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
2 changes: 1 addition & 1 deletion src/ch18-01-all-the-places-for-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ c is at index 2

We use the `enumerate` method to adapt an iterator to produce a value and that
value’s index in the iterator, placed into a tuple. The first call to
`enumerate` produces the tuple `(0, 'a')`. When this value is matched to the
`next` produces the tuple `(0, 'a')`. When this value is matched to the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem here is that I'm not sure if at this point in the book we've talked about how iterators have a next method?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps then, "The first value the enumerated iterator produces is the tuple ..."

pattern `(index, value)`, `index` will be `0` and `value` will be `'a'`,
printing the first line of the output.

Expand Down