All it does is convert a Seq (sequence) to a lazy stream that will infinitely cycle through the values.
Seq(1, 2, 3).cycle.take(8).toList
res3: List[Int] = List(1, 2, 3, 1, 2, 3, 1, 2)
It will work for any seq-like structure (including List. Vector, Queue, etc.)If you try to use it with anything else, like a Map, it won't compile.
Also, note from my example that it's generic and the resulting List is of the correct type.
Just like novice JavaScript developers struggle with "Why 'this' changes here?", it requires some experience with the language.