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

    Return all the elements of a list except the last one. The list must be
    non-empty.
    """
    if null(xs):
        raise IndexError("empty list")
    return xs[:-1]
dataset/ETHPy150Open billpmurphy/hask/hask/Data/List.py/init/original