Product

public struct Product<Value> : MonoidView where Value : Multiplicative
extension Product: Multiplicative

Multiplicative monoidal view of a Multiplicative-conforming type.

Type Properties

  • Declaration

    Swift

    public static var identity: Product { get }

    Return Value

    The multiplicative identity wrapped in a MultiplicativeMonoid.

Type Methods

  • Declaration

    Swift

    public static func <> (lhs: Product, rhs: Product) -> Product

    Return Value

    The composition of the two given values.

Instance Properties

  • Value wrapped by MultiplicativeMonoid.

    Declaration

    Swift

    public let value: Value

Initializers

  • Creates a MultiplicativeMonoid with the given value.

    Declaration

    Swift

    public init(_ value: Value)

Multiplicative

  • one

    Declaration

    Swift

    public static var one: Product<Value> { get }

    Return Value

    The wrapped-up one type property of the wrapped type.

  • Declaration

    Swift

    public static func * (lhs: Product<Value>, rhs: Product<Value>) -> Product<Value>

    Return Value

    The wrapped-up product of the two given values.