-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[stdlib] Fix the example in LazySequenceProtocol docs. #24270
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
Conversation
I'm not sure this code ever worked, but this new version does. Also includes some style revisions to the surrounding text.
@swift-ci Please smoke test |
@swift-ci Please Build Toolchain macOS Platform |
macOS Toolchain Install command |
@swift-ci Please smoke test |
/// of the lazy sequence is accessed, an element of the underlying | ||
/// array is accessed and transformed by the closure. | ||
/// Each time an element of the lazy sequence `doubled` is accessed, an element | ||
/// of the underlying array is accessed and transformed by the closure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this clearer in passive voice or active voice?
Each time an element of the lazy sequence
doubled
is accessed, the closure accesses and transforms an element of the underlying array.
/// [We don't recommend that you use `map` this way, because it | ||
/// creates and discards an array. `sum` would be better implemented | ||
/// using `reduce`]. | ||
/// Don't actually use `map` for this purpose, however, since it creates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ASG uses "since" only in the temporal sense.
/// Don't actually use `map` for this purpose, however, since it creates | |
/// Don't actually use `map` for this purpose, however, because it creates |
@swift-ci Please smoke test and merge |
1 similar comment
@swift-ci Please smoke test and merge |
I'm not sure this code ever worked, but this new version does. Also includes some style revisions to the surrounding text.