struct
JoinedIterator
<
Base
:
IteratorProtocol
where
Base
.
Element
:
Sequence
>
Inheritance |
IteratorProtocol
View Protocol Hierarchy →
|
---|---|
Import |
|
Initializers
Creates an iterator that presents the elements of the sequences
traversed by base
, concatenated using separator
.
Complexity: O(separator.count
).
Declaration
init
<
Separator
:
Sequence
where
Separator
.
Iterator
.
Element
==
Base
.
Element
.
Iterator
.
Element
>
(
base
:
Base
,
separator
:
Separator
)
Instance Methods
Advances to the next element and returns it, or nil
if no next element
exists.
Once nil
has been returned, all subsequent calls return nil
.
Declaration
mutating
func
next
() -
>
Base
.
Element
.
Iterator
.
Element
?
An iterator that presents the elements of the sequences traversed by a base iterator, concatenated using a given separator.