@sig(H/ ["a"] >> ["a"])
def cycle(x):
    """
    cycle :: [a] -> [a]

    cycle ties a finite list into a circular one, or equivalently, the infinite
    repetition of the original list. It is the identity on infinite lists.
    """
    def __cycle(x):
        while True:
            for i in x:
                yield i
    return L[__cycle(x)]


#=============================================================================#
## Unfolding
dataset/ETHPy150Open billpmurphy/hask/hask/Data/List.py/cycle/original