@sig(H/ ["a"] >> [["a"]] )
def permutations(xs):
    """
    permutations :: [a] -> [[a]]

    The permutations function returns the list of all permutations of the
    argument.
    """
    if null(xs):
        return L[[]]
    return L[(L[x] for x in itertools.permutations(xs))]


#=============================================================================#
# Reducing lists (folds)
dataset/ETHPy150Open billpmurphy/hask/hask/Data/List.py/permutations/original