def prod(xs):
    """Computes the product along the elements in an iterable. Returns 1 for empty
        iterable.
    Args:
        xs: Iterable containing numbers.

    Returns: Product along iterable.

    """
    p = 1
    for x in xs:
        p *= x
    return p