Sum
public struct Sum<Value> : MonoidView where Value : Additive
extension Sum: Additive
Additive monoidal view of a Additive
-conforming type.
-
Declaration
Swift
public static var identity: Sum { get }
Return Value
The additive identity wrapped in a
AdditiveMonoid
.
-
Declaration
Swift
public static func <> (lhs: Sum, rhs: Sum) -> Sum
Return Value
The composition of the two given values.
-
Value wrapped by
AdditiveMonoid
.Declaration
Swift
public let value: Value
-
Creates a
AdditiveMonoid
with the givenvalue.
Declaration
Swift
public init(_ value: Value)