product package:rio

The product function computes the product of the numbers of a structure.
O(n) Compute the produce of the elements

Examples

>>> import qualified Data.Vector as V

>>> V.product $ V.fromList [1,2,3,4 :: Int]
24

>>> V.product (V.empty :: V.Vector Int)
1
O(n) Compute the produce of the elements

Examples

>>> import qualified Data.Vector as V

>>> V.product $ V.fromList [1,2,3,4 :: Int]
24

>>> V.product (V.empty :: V.Vector Int)
1
O(n) Compute the produce of the elements

Examples

>>> import qualified Data.Vector.Storable as VS

>>> VS.product $ VS.fromList [1,2,3,4 :: Int]
24

>>> VS.product (VS.empty :: VS.Vector Int)
1
O(n) Compute the produce of the elements

Examples

>>> import qualified Data.Vector.Unboxed as VU

>>> VU.product $ VU.fromList [1,2,3,4 :: Int]
24

>>> VU.product (VU.empty :: VU.Vector Int)
1
The biproduct function computes the product of the numbers of a structure.