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-6864] Add a "cycle" method to the standard library #49413

airspeedswift opened this issue Jan 29, 2018 · 1 comment

[SR-6864] Add a "cycle" method to the standard library #49413

airspeedswift opened this issue Jan 29, 2018 · 1 comment


Copy link

airspeedswift commented Jan 29, 2018

Previous ID SR-6864
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: ce3f8a07c6a7edad8e1997fb1e825980

Issue Description:

It is often useful to cycle over a sequence indefinitely. For example, just like you can write zip(repeatElement("foo", count: Int.max), myArray) and zip(1..., myArray), you could write {{zip([.grey,.white].cycle(), myArray)}}.

Copy link

swift-ci commented Mar 22, 2018

Comment by erica sadun (JIRA)

What the hey.

Forum pitch: [[Starter Pitch] Introducing a `cycled` method to `Sequence`|]


@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants