Sequence

protocol Sequence
  • Returns an Set containing the results of mapping and filtering transform over self.

    Declaration

    Swift

    public func rsd_flatMapSet<T>(_ transform: (Self.Iterator.Element) throws -> T?) rethrows -> Set<T> where T : Hashable

    Parameters

    transform

    The method which returns either the transformed element or nil if filtered.

    Return Value

    A set of the transformed elements.

  • Find the next element in the Sequence after the element that matches the given criterion.

    Declaration

    Swift

    public func rsd_next(after evaluate: (Self.Iterator.Element) throws -> Bool) rethrows -> Self.Iterator.Element?

    Parameters

    evaluate

    The function to use to evaluate the search pattern.

    Return Value

    The next element after the one that matchs the pattern.

  • Find the previous element in the Sequence before the element that matches the given criterion. Evaluation is performed on the reversed enumeration.

    Declaration

    Swift

    public func rsd_previous(before evaluate: (Self.Iterator.Element) throws -> Bool) rethrows -> Self.Iterator.Element?

    Parameters

    evaluate

    The function to use to evaluate the search pattern.

    Return Value

    The previous element before the one that matchs the pattern.