cycle package:base-compat-batteries

cycle xs returns the infinite repetition of xs:
cycle (1 :| [2,3]) = 1 :| [2,3,1,2,3,...]
A generalization of cycle to an arbitrary Semigroup. May fail to terminate for some values in some semigroups.