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

    filter, applied to a predicate and a list, returns the list of those
    elements that satisfy the predicate
    """
    return L[itertools.ifilter(f, xs)]
dataset/ETHPy150Open billpmurphy/hask/hask/Data/List.py/filter/original