[Haskell-cafe] Confused about Cyclic struture

Dinh Tien Tuan Anh tuananhbirm at hotmail.com
Thu Jul 7 14:43:38 EDT 2005


Hi,
Im a newbie to Haskell and the concept of "cyclic strutures" has confused me 
a lot

For example (taken from Richard Bird's book):

    ones = 1:ones
Its clear that it involves a cyclic structure

But:

          ones = repeat 1
          repeat x = x:repeat x

I dont really understand what the differences between these two and why the 
latter does not have a cyclic structure ?
  Why does changing :
          repeat x = xs where xs = x:xs
    create a cyclic stucture ?


Thank you
Anh

_________________________________________________________________
Winks & nudges are here - download MSN Messenger 7.0 today! 
http://messenger.msn.co.uk



More information about the Haskell-Cafe mailing list