Instance Property

lazy

A sequence containing the same elements as this sequence, but on which some operations, such as map and filter, are implemented lazily.

Declaration

var lazy: LazySequence<Self> { get }

See Also

Transforming a Sequence

func compactMap<ElementOfResult>((Self.Element) -> ElementOfResult?) -> [ElementOfResult]

Returns an array containing the non-nil results of calling the given transformation with each element of this sequence.

func flatMap<ElementOfResult>((Self.Element) -> ElementOfResult?) -> [ElementOfResult]

Returns an array containing the non-nil results of calling the given transformation with each element of this sequence.

Deprecated
func flatMap<SegmentOfResult>((Self.Element) -> SegmentOfResult) -> [SegmentOfResult.Element]

Returns an array containing the concatenated results of calling the given transformation with each element of this sequence.

func reduce<Result>(Result, (Result, Self.Element) -> Result) -> Result

Returns the result of combining the elements of the sequence using the given closure.