
On 11 September 2017 at 02:46, Wolfgang Jeltsch
Am Sonntag, den 10.09.2017, 10:39 +0200 schrieb Herbert Valerio Riedel:
What you seem to be searching for looks more like what we know as `cycle :: [a] -> [a]`, and in fact there is its generalisation at
http://hackage.haskell.org/package/base-4.10.0.0/docs/ Data-Semigroup.html#v:cycle1
Why is this function called cycle1, not cycle? What does the “1” stand for?
I guess this is not named "cycle" to avoid conflict with "Data.List.cycle". I was also wondering why it is "cycle1" instead of, say "scycle". It can be thought of as cycling just one value instead of cycling a list in case of "Data.List.cycle". I Just made up this explanation, original writers would know better. I would prefer "scycle" which is consistent with other functions in this package like "stimes", cycle1 sounds a bit random at first look. -harendra