Sequence
extension Sequence
-
Returns the first element where the comparison function returns
true
ornil
if the comparisun functoin always returnsfalse
.Complexity
O(self.count
).Declaration
Swift
public func findFirstWhere(_ found: (Iterator.Element) -> Bool) -> Iterator.Element?
-
return a set containing the elements from the given sequence
Declaration
Swift
public var asSet: Set<Iterator.Element> { get }