Sequence
public extension Sequence
public extension Sequence where Element: Equatable
public extension Sequence where Element: BinaryFloatingPoint
public extension Sequence where Element: Occupiable
public extension Sequence where Element: OptionalType
-
Returns
self
asArray
.Declaration
Swift
var asArray: [Element] { get }
-
Undocumented
Declaration
Swift
func splitBefore(separator isSeparator: (Iterator.Element) -> Bool) -> [AnySequence<Iterator.Element>]
-
Undocumented
Declaration
Swift
@inlinable func count(where isIncluded: (Element) throws -> Bool) rethrows -> Int
-
Helper method to filter out duplicates. Element will be filtered out if closure return true.
Declaration
Swift
@inlinable func filterDuplicates(_ includeElement: (_ lhs: Element, _ rhs: Element) throws -> Bool) rethrows -> [Element]
-
Transforms an array to a dictionary using array elements as keys and transform result as values.
Declaration
Swift
@inlinable func dictionaryMap<T>(_ transform: (_ element: Iterator.Element) throws -> T?) rethrows -> [Iterator.Element : T] where Self.Element : Hashable
-
Returns whether collection has at least one common element with passed array.
Declaration
Swift
@inlinable func hasIntersection(with array: [Element]) -> Bool
-
Returns intersection array.
Declaration
Swift
@inlinable func intersection(with array: [Element]) -> [Element]
-
Helper method to filter out duplicates
Declaration
Swift
@inlinable func filterDuplicates() -> [Element]
-
Returns averge value of all elements in a sequence.
Declaration
Swift
func average() -> Element
-
Returns an array containing, in order, the elements of the sequence filtering out all empty elements.
Declaration
Swift
func filterEmpty() -> [Element]
Return Value
An array of non-empty elements with preserved order.
-
Undocumented
Declaration
Swift
func filterNil() -> [Element.Wrapped]