Instance Methodswift 6.1.2Swift
forEach(_:)
func forEach(_ body: (Element) throws -> Void) rethrows func forEach(_ body: (Element) throws -> Void) rethrows import Swift@frozen struct AnySequence<Element>A type-erased sequence.
typealias Void = ()The return type of functions that don’t explicitly specify a return type, that is, an empty tuple ().
init<S>(_ base: S) where Element == S.Element, S : Sequence Creates a new sequence that wraps and forwards operations to base.
init<I>(_ makeUnderlyingIterator: @escaping () -> I) where Element == I.Element, I : IteratorProtocol Creates a sequence whose makeIterator() method forwards to makeUnderlyingIterator.
var underestimatedCount: Int { get }func drop(while predicate: (Element) throws -> Bool) rethrows -> AnySequence<Element> func dropFirst(_ n: Int = 1) -> AnySequence<Element> func dropLast(_ n: Int = 1) -> [Element] func filter(_ isIncluded: (Element) throws -> Bool) rethrows -> [Element] func makeIterator() -> AnySequence<Element>.Iterator func map<T, E>(_ transform: (Element) throws(E) -> T) throws(E) -> [T] where E : Error func prefix(_ maxLength: Int = 1) -> AnySequence<Element> func prefix(while predicate: (Element) throws -> Bool) rethrows -> [Element] func suffix(_ maxLength: Int) -> [Element] typealias Iterator = AnyIterator<Element>