Sequence
protocol Sequence
-
Returns an
Setcontaining the results of mapping and filteringtransformoverself.Declaration
Swift
public func rsd_flatMapSet<T>(_ transform: (Self.Iterator.Element) throws -> T?) rethrows -> Set<T> where T : HashableParameters
transformThe method which returns either the transformed element or
nilif filtered.Return Value
A set of the transformed elements.
-
Find the next element in the
Sequenceafter 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
evaluateThe 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
Sequencebefore 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
evaluateThe function to use to evaluate the search pattern.
Return Value
The previous element before the one that matchs the pattern.
View on GitHub
Sequence Extension Reference