The cycle function turns a list into an infinite list by repeating it. For instance, cycle [1,2,3] is [1,2,3,1,2,3,1,2,3...]. I could be wrong but I don’t think you can do this one purely with folds and here’s why:
The infinite list would have to be the accumulator.
A fold (foldr or foldl) operation steps over (processes) each element of the finite input list exactly once.
Each step can insert only a finite number of elements into the accumulator list.
Thus the final accumulated list must be finite.
Of course, Murphy’s Law guarantees that someone is now going to post a cycle implementation with pure folds in the comments. If there’s a mistake in this proof, it’s in step 3. But it really feels to me like a fold alone won’t do the trick. You have to use recursion of some sort here. Maybe a fold of folds? What if the step function is itself a fold?