EmptyGenerator

struct EmptyGenerator<T>

A generator that never produces an element.

See also: EmptyCollection<T>.

Inheritance GeneratorType, SequenceType, _SequenceType, _Sequence_Type View Protocol Hierarchy →
Associated Types
Generator = EmptyGenerator<T>

Type alias inferred.

Element = Generator.Element

Type alias inferred.

Import import Swift

Initializers

init()

Construct an instance

Declaration

init()

Instance Methods

func generate()

EmptyGenerator is also a SequenceType, so it generate's a copy of itself

Declaration

func generate() -> EmptyGenerator<T>
mutating func next()

Return nil, indicating that there are no more elements.

Declaration

mutating func next() -> T?