Skip to content

[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

Merged
merged 5 commits into from
Sep 29, 2019

Conversation

natecook1000
Copy link
Member

I'm not sure this code ever worked, but this new version does. Also includes some style revisions to the surrounding text.

I'm not sure this code ever worked, but this new version does. Also
includes some style revisions to the surrounding text.
@natecook1000
Copy link
Member Author

@swift-ci Please smoke test

@natecook1000
Copy link
Member Author

@swift-ci Please Build Toolchain macOS Platform

@swift-ci
Copy link
Contributor

swift-ci commented May 1, 2019

macOS Toolchain
Download Toolchain
Git Sha - 3be8321

Install command
tar -zxf swift-PR-24270-305-osx.tar.gz --directory ~/

@natecook1000
Copy link
Member Author

@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.
Copy link
Member

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
Copy link
Member

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.

Suggested change
/// Don't actually use `map` for this purpose, however, since it creates
/// Don't actually use `map` for this purpose, however, because it creates

@natecook1000
Copy link
Member Author

@swift-ci Please smoke test and merge

1 similar comment
@natecook1000
Copy link
Member Author

@swift-ci Please smoke test and merge

@swift-ci swift-ci merged commit d1c87f3 into swiftlang:master Sep 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants