Functions

The following functions are available globally.

  • Compute the prefix sum of seq.

    Declaration

    Swift

    public func scan<
      S : Sequence, U
    >(_ seq: S, _ initial: U, _ combine: (U, S.Element) -> U) -> [U]