struct
IndexingGenerator
<
C
:
_CollectionType
>
Inheritance |
GeneratorType, SequenceType, _SequenceType, _Sequence_Type
View Protocol Hierarchy →
|
---|---|
Associated Types |
Type alias inferred.
Type alias inferred. |
Import |
|
Initializers
Create a generator over the given collection
Declaration
init
(
_
seq
:
C
)
Instance Methods
Return a generator over the elements of this sequence.
Complexity: O(1)
Declaration
func
generate
() -
>
IndexingGenerator
<
C
>
Advance to the next element and return it, or nil
if no next
element exists.
Requires: no preceding call to self.next()
has returned nil
.
Declaration
mutating
func
next
() -
>
C
.
_Element
?
A generator for an arbitrary collection. Provided
C
conforms to the other requirements of CollectionType,IndexingGenerator<C>
can be used as the result ofC
'sgenerate()
method. For example: