@sig(H/ (H/ "a" >> "a" >> Ordering) >> ["a"] >> "a")
def maximumBy(f, xs):
    """
    maximumBy :: (a -> a -> Ordering) -> [a] -> a

    The maximumBy function takes a comparison function and a list and returns
    the greatest element of the list by the comparison function. The list must
    be finite and non-empty.
    """
    return max(xs, key=f)
dataset/ETHPy150Open billpmurphy/hask/hask/Data/List.py/maximumBy/original