Zip2Generator

struct Zip2Generator<Generator1 : GeneratorType, Generator2 : GeneratorType>

A generator for Zip2Sequence.

Inheritance GeneratorType View Protocol Hierarchy →
Associated Types
Element = (Generator1.Element, Generator2.Element)

The type of element returned by next().

Import import Swift

Initializers

init(_:_:)

Construct around a pair of underlying generators.

Declaration

init(_ generator1: Generator1, _ generator2: Generator2)

Instance Methods

mutating func next()

Advance to the next element and return it, or nil if no next element exists.

Requires: next() has not been applied to a copy of self since the copy was made, and no preceding call to self.next() has returned nil.

Declaration

mutating func next() -> (Generator1.Element, Generator2.Element)?