[Haskell] Newbie : How come that cyclic recursive lists are efficient ?

Benjamin Franksen benjamin.franksen at bessy.de
Mon Jan 24 17:39:59 EST 2005

On Monday 24 January 2005 21:47, Francis Girard wrote:
> But I can't help thinking that the distinction between "being" a list of
> integers and "being" a function that "returns" a list of integers (without
> arguments) is not always clear in FP ... since there is not really such a
> thing as returning a value in declarative programming, neither in
> mathematical thinking.

There *is no* difference between the two if one views them as pure 
mathematical values. Questions of run time speed or memory usage, i.e. 
efficiency (which your original question was about) are clearly outside the 
realm of pure values, and thus we may perceive them as distinct in this wider 

My favourite analogy for this is the old joke about a topologist being a 
person who cannot see any difference between a cup and a doghnut.


More information about the Haskell mailing list