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) -> SumReturn Value
The composition of the two given values.
-
Value wrapped by
AdditiveMonoid.Declaration
Swift
public let value: Value
-
Creates a
AdditiveMonoidwith the givenvalue.Declaration
Swift
public init(_ value: Value)
View on GitHub
Install in Dash
Sum Structure Reference