import functools
import operator


def product(xs):
    """
    product :: Num a => [a] -> a

    The product function computes the product of a finite list of numbers.
    """
    return functools.reduce(operator.mul, xs, 1)