Sequence

public extension Sequence where Iterator.Element: Monoid

Available where Iterator.Element: Monoid

  • Fold a sequence using monoid.

    For most types, the default definition for mconcat() will be used, but the function must be an optimized version for specific types.

    Declaration

    Swift

    func mconcat() -> Iterator.Element

    Return Value

    Element combined with mappend(_:) function.