Skip to content
This repository has been archived by the owner on Oct 17, 2021. It is now read-only.

Latest commit

 

History

History
23 lines (17 loc) · 317 Bytes

README.md

File metadata and controls

23 lines (17 loc) · 317 Bytes

Cycle

A sequence that cycles between each of the items in a given sequence.

for (number, parity) in zip(0..<5, ["even", "odd"].cycled()) {
    print(number, parity)
}
// Prints:
// 0 even
// 1 odd
// 2 even
// 3 odd
// 4 even

License

MIT

Contact

Mattt (@mattt)