-
Empty element.
The empty element must obey the monoid laws:
a.combine(empty()) == empty().combine(a) == aThat is, combining any element with
emptymust return the original element.Declaration
Swift
static func empty() -> SelfReturn Value
A value of the implementing type satisfying the monoid laws.
-
combineAll(_:)Extension methodCombines a variable number of values of the implementing type, in the order provided in the call.
Declaration
Swift
static func combineAll(_ elems: Self...) -> SelfParameters
elemsValues of the implementing type.
Return Value
A single value of the implementing type representing the combination of all the parameter values.
-
combineAll(_:)Extension methodCombines an array of values of the implementing type, in the order provided in the call.
Declaration
Swift
static func combineAll(_ elems: [Self]) -> SelfParameters
elemsValues of the implementing type.
Return Value
A single value of the implementing type representing the combination of all the parameter values.
Install in Dash
Monoid Protocol Reference