product is:exact package:base set:included-with-ghc

The product function computes the product of the numbers of a structure.

Examples

Basic usage:
>>> product []
1
>>> product [42]
42
>>> product [1..10]
3628800
>>> product [4.1, 2.0, 1.7]
13.939999999999998
>>> product [1..]
* Hangs forever *
The product function computes the product of a finite list of numbers.
>>> product []
1

>>> product [42]
42

>>> product [1..10]
3628800

>>> product [4.1, 2.0, 1.7]
13.939999999999998

>>> product [1..]
* Hangs forever *