Skip to content
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

Ensure chunked(by:) always compares consecutive elements #162

Merged

Conversation

timvermeulen
Copy link
Contributor

Fixes #161.

[a, b, c, d].chunked(by: { print($0, $1); return true })
// previous behavior: (a, b), (a, c), (a, d)
// correct behavior:  (a, b), (b, c), (c, d)

Checklist

  • I've added at least one test that validates that my change is working, if appropriate
  • I've followed the code style of the rest of the project
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary

@timvermeulen
Copy link
Contributor Author

@swift-ci Please test

@timvermeulen timvermeulen merged commit 9f62800 into apple:main Aug 17, 2021
This pull request was closed.
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.

Chunked(by:) behavior seems incompatible with its documentation.
2 participants