Generic Type Alias

LazyFilterCollection

A lazy Collection wrapper that includes the elements of an underlying collection that satisfy a predicate.

Declaration

typealias LazyFilterCollection<T> = LazyFilterSequence<T> where T : Collection

Discussion

Topics

Instance Properties

var endIndex: LazyFilterSequence<Base>.Index

The collection’s “past the end” position—that is, the position one greater than the last valid subscript argument.

var startIndex: LazyFilterSequence<Base>.Index

The position of the first element in a non-empty collection.

var underestimatedCount: Int

Instance Methods

func distance(from: LazyFilterSequence<Base>.Index, to: LazyFilterSequence<Base>.Index) -> Int

Returns the distance between two indices.

func formIndex(after: inout LazyFilterSequence<Base>.Index)

Replaces the given index with its successor.

func formIndex(before: inout LazyFilterSequence<Base>.Index)

Replaces the given index with its predecessor.

func index(LazyFilterSequence<Base>.Index, offsetBy: Int) -> LazyFilterSequence<Base>.Index

Returns an index that is the specified distance from the given index.

func index(LazyFilterSequence<Base>.Index, offsetBy: Int, limitedBy: LazyFilterSequence<Base>.Index) -> LazyFilterSequence<Base>.Index?

Returns an index that is the specified distance from the given index, unless that distance is beyond a given limiting index.

func index(after: LazyFilterSequence<Base>.Index) -> LazyFilterSequence<Base>.Index

Returns the position immediately after the given index.

func index(before: LazyFilterSequence<Base>.Index) -> LazyFilterSequence<Base>.Index

Returns the position immediately before the given index.

Subscripts

subscript(LazyFilterSequence<Base>.Index) -> LazyFilterSequence<Base>.Element

Accesses the element at position.

subscript(Range<LazyFilterSequence<Base>.Index>) -> LazyFilterSequence<Base>.SubSequence

Accesses a contiguous subrange of the collection’s elements.

See Also

Lazy Wrappers

struct LazySequence

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

struct LazyMapSequence

A Sequence whose elements consist of those in a Base Sequence passed through a transform function returning Element. These elements are computed lazily, each time they’re read, by calling the transform function on a base element.

struct LazyFilterSequence

A sequence whose elements consist of the elements of some base sequence that also satisfy a given predicate.

struct LazyPrefixWhileSequence

A sequence whose elements consist of the initial consecutive elements of some base sequence that satisfy a given predicate.

struct LazyDropWhileSequence

A sequence whose elements consist of the elements that follow the initial consecutive elements of some base sequence that satisfy a given predicate.

typealias LazyCollection

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

typealias LazyDropWhileCollection

A lazy wrapper that includes the elements of an underlying collection after any initial consecutive elements that satisfy a predicate.

typealias LazyMapCollection

A Collection whose elements consist of those in a Base Collection passed through a transform function returning Element. These elements are computed lazily, each time they’re read, by calling the transform function on a base element.

typealias LazyPrefixWhileCollection

A lazy collection wrapper that includes the initial consecutive elements of an underlying collection that satisfy a predicate.