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

[SR-6867] "Chunking" split #49416

Open
airspeedswift opened this issue Jan 29, 2018 · 1 comment
Open

[SR-6867] "Chunking" split #49416

airspeedswift opened this issue Jan 29, 2018 · 1 comment
Labels
feature A feature request or implementation good first issue Good for newcomers standard library Area: Standard library umbrella swift evolution proposal needed Flag → feature: A feature that warrants a Swift evolution proposal

Comments

@airspeedswift
Copy link
Member

Previous ID SR-6867
Radar None
Original Reporter @airspeedswift
Type New Feature
Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels New Feature, StarterProposal
Assignee None
Priority Medium

md5: d78e8d70fcb68ef04d5d9fac882fce1f

Issue Description:

It is possible to split a collection per element, but not by a count i.e. split an array into subsequences of length 3, or more generally any collection into subsequence of length n. There should be a ability to do this lazily for collections and eagerly for sequences.

@jckarter
Copy link
Member

Along these lines, the "every adjacent n elements" split is frequently useful too, e.g. for [a, b, c, d, e], give [[a, b, c], [b, c, d], [c, d, e]] .

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added feature A feature request or implementation swift evolution proposal needed Flag → feature: A feature that warrants a Swift evolution proposal good first issue Good for newcomers and removed new feature StarterProposal labels Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A feature request or implementation good first issue Good for newcomers standard library Area: Standard library umbrella swift evolution proposal needed Flag → feature: A feature that warrants a Swift evolution proposal
Projects
None yet
Development

No branches or pull requests

3 participants