-
Empty element.
The empty element must obey the monoid laws:
a.combine(empty()) == empty().combine(a) == a
That is, combining any element with
empty
must return the original element.Declaration
Swift
static func empty() -> Self
Return 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...) -> Self
Parameters
elems
Values 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]) -> Self
Parameters
elems
Values of the implementing type.
Return Value
A single value of the implementing type representing the combination of all the parameter values.