@sig(H/ ("a"/ H >> "a") >> "a" >> ["a"])
def iterate(f, x):
    """
    iterate :: (a -> a) -> a -> [a]

    iterate(f, x) returns an infinite List of repeated applications of f to x:
    iterate(f, x) == [x, f(x), f(f(x)), ...]
    """
    def __iterate(f, x):
        while True:
            yield x
            x = f(x)
    return L[__iterate(f, x)]
dataset/ETHPy150Open billpmurphy/hask/hask/Data/List.py/iterate/swapped operands of `/`