Contents

filteredIndexSet(in:includeInteger:)

Returns an IndexSet filtered according to the result of includeInteger.

Declaration

func filteredIndexSet(in range: ClosedRange<IndexSet.Element>, includeInteger: (IndexSet.Element) throws -> Bool) rethrows -> IndexSet

Parameters

  • range:

    A range of integers. For each integer in the range that intersects the integers in the IndexSet, then the includeInteger predicate will be invoked.

  • includeInteger:

    The predicate which decides if an integer will be included in the result or not.

See Also

Selecting Elements