cycle package:rio

cycle ties a finite ByteString into a circular one, or equivalently, the infinite repetition of the original ByteString.
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.
cycle xs returns the infinite repetition of xs:
cycle (1 :| [2,3]) = 1 :| [2,3,1,2,3,...]
cycle ties a finite, non-empty Text into a circular one, or equivalently, the infinite repetition of the original Text.
O(log k). cycleTaking k xs forms a sequence of length k by repeatedly concatenating xs with itself. xs may only be empty if k is 0.
cycleTaking k = fromList . take k . cycle . toList