scan(_:_:)
Reductions.swift:565This declaration is deprecated: Use reductions(_:_:) instead.
func scan<Result>(_ initial: Result, _ transform: @escaping (Result, Element) -> Result) -> ExclusiveReductionsSequence<Elements, Result>
This declaration is deprecated: Use reductions(_:_:) instead.
func scan<Result>(_ initial: Result, _ transform: @escaping (Result, Element) -> Result) -> ExclusiveReductionsSequence<Elements, Result>
ss20LazySequenceProtocolP10AlgorithmsE4scanyAC019ExclusiveReductionsB0Vy8ElementsQzqd__Gqd___qd__qd___7ElementQztctlF
What are these?53MMN
import Swift
import Algorithms
Swift Algorithms is an open-source package of sequence and collection algorithms, along with their related types.
protocol LazySequenceProtocol : Sequence
A sequence on which normally-eager sequence operations are implemented lazily.
associatedtype Element where Self.Element == Self.Iterator.Element
A type representing the sequence’s elements.
struct ExclusiveReductionsSequence<Base, Result> where Base : Sequence
A sequence of applying a transform to the element of a sequence and the previously transformed result.
associatedtype Elements : Sequence = Self where Self.Element == Self.Elements.Element
A Sequence
that can contain the same elements as this one, possibly with a simpler type.
func scan(_ transform: (Element, Element) throws -> Element) rethrows -> [Element]
func scan<Result>(_ initial: Result, _ transform: (Result, Element) throws -> Result) rethrows -> [Result]
func scan<Result>(into initial: Result, _ transform: (inout Result, Element) throws -> Void) rethrows -> [Result]
func scan(_ transform: @escaping (Element, Element) -> Element) -> InclusiveReductionsSequence<Elements>
func scan<Result>(into initial: Result, _ transform: @escaping (inout Result, Element) -> Void) -> ExclusiveReductionsSequence<Elements, Result>
func reductions(_ transform: @escaping (Element, Element) -> Element) -> InclusiveReductionsSequence<Elements>
Returns a sequence containing the accumulated results of combining the elements of the sequence using the given closure.
func reductions<Result>(_ initial: Result, _ transform: @escaping (Result, Element) -> Result) -> ExclusiveReductionsSequence<Elements, Result>
Returns a sequence containing the accumulated results of combining the elements of the sequence using the given closure.
func reductions<Result>(into initial: Result, _ transform: @escaping (inout Result, Element) -> Void) -> ExclusiveReductionsSequence<Elements, Result>
Returns a sequence containing the accumulated results of combining the elements of the sequence using the given closure.
func split(maxSplits: Int = Int.max, omittingEmptySubsequences: Bool = true, whereSeparator isSeparator: @escaping (Element) -> Bool) -> SplitSequence<Elements>
Lazily returns the longest possible subsequences of the sequence, in order, that don’t contain elements satisfying the given predicate.
func uniqued<Subject>(on projection: @escaping (Element) -> Subject) -> UniquedSequence<Self, Subject> where Subject : Hashable
Returns a lazy sequence with the unique elements of this sequence (as determined by the given projection), in the order of the first occurrence of each unique element.