[Haskell-cafe] Confused about Cyclic struture
Dinh Tien Tuan Anh
tuananhbirm at hotmail.com
Thu Jul 7 14:43:38 EDT 2005
Im a newbie to Haskell and the concept of "cyclic strutures" has confused me
For example (taken from Richard Bird's book):
ones = 1:ones
Its clear that it involves a cyclic structure
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 ?
Winks & nudges are here - download MSN Messenger 7.0 today!
More information about the Haskell-Cafe