I could not find an equivalent function of Python cycle in itertools:
from itertools import cycle
g = cycle(('a','b'))
next(g) # a
next(g) # b
next(g) # a
# etc. etc.
in Javascript.
The goal is to create an infinite cycle in an array of values. I guess I could use a Javascript generator but I was wondering if there is any built-in function.