Product -package:generic-lens

Products, lifted to functors.
Lifted product of functors.

Examples

>>> fmap (+1) (Pair [1, 2, 3] (Just 0))
Pair [2,3,4] (Just 1)
>>> Pair "Hello, " (Left 'x') <> Pair "World" (Right 'y')
Pair "Hello, World" (Right 'y')
Monoid under multiplication.
Product x <> Product y == Product (x * y)

Examples

>>> Product 3 <> Product 4 <> mempty
Product {getProduct = 12}
>>> mconcat [ Product n | n <- [2 .. 10]]
Product {getProduct = 3628800}
The product of two bifunctors.
Form the product of two bifunctors
Monoid under multiplication.
>>> getProduct (Product 3 <> Product 4 <> mempty)
12
Matrix product and related functions
Monoid under multiplication.
>>> getProduct (Product 3 <> Product 4 <> mempty)
12
TextShow instance for Product. Since: 3
Monoid under multiplication.
>>> getProduct (Product 3 <> Product 4 <> mempty)
12
A wrapper for an Multiplicative which distinguishes the multiplicative structure
Product of field values to be used in an aggregate operation. This was added in Vega-Lite 4.6.0.
Lifted product of functors.