@sig(H/ (H/ "a" >> "a" >> bool) >> ["a"] >> [["a"]])
def groupBy(f, xs):
    """
    groupBy :: (a -> a -> Bool) -> [a] -> [[a]]

    The groupBy function is the non-overloaded version of group.
    """
    return L[(L[i[1]] for i in itertools.groupby(xs, keyfunc=f))]


#=============================================================================#
### User-supplied comparison (replacing an Ord context)
dataset/ETHPy150Open billpmurphy/hask/hask/Data/List.py/groupBy/original