Haskell cyclic structure

66 views Asked by At

I have two definitions of ones/0, both resulting in an infinite list of ones:

ones = 1 : ones

ones = repeat 1
repeat::a->[a]
repeat x = x : repeat x

I'm being told that the first one is a cyclic structure, while the second one is not. Is that true? And what does that actually mean/how can I tell whether a structure is cyclic or not?

0

There are 0 answers