A GYD template for producing ZipSequences of arbitrary arity.
A GYD template for producing ZipSequences of arbitrary arity.
let a = [1, 2, 3]
let b = [4, 5, 6]
let c = [7, 8, 9]
for (x, y, z) in zip(a, b, c) {
print("\(x) \(y) \(z)")
}
If the pre-generaged ZipSequences don’t suite your needs, generate your own:
gyb.py
) from the Swift repository.python gyb.py --line-directive '' -D arityS=3 ZipNSequence.swift.gyb -o Zip3Sequence.swift
ZipNSequence.swift.gyb