Returns the maximum number in 'elements'. Uses 'ordered' for comparisons,
        or '<' is none is provided.

def max_element (elements, ordered = None):
    """ Returns the maximum number in 'elements'. Uses 'ordered' for comparisons,
        or '<' is none is provided.
    """
    assert is_iterable(elements)
    assert callable(ordered) or ordered is None
    if not ordered: ordered = operator.lt

    max = elements [0]
    for e in elements [1:]:
        if ordered (max, e):
            max = e

    return max