Creates an infinite list from a finite list by appending the list to
itself infinite times (i.e. by cycling the list). Unlike
cycle from
Data.List, this implementation doesn't
throw error on empty lists, but returns an empty list instead.
>>> cycle []
[]
>>> take 10 $ cycle [1,2,3]
[1,2,3,1,2,3,1,2,3,1]