Operational behaviour of Clean Programs...
Ronny Wichers Schreur
ronny@cs.kun.nl
Tue, 18 Jul 2000 15:54:47 +0200
Hello,
John van Groningen wrote (to the Clean Mailing List):
> In Haskell top level functions with no arguments are treated as CAFs
CAF is an acronym for Constant Applicative Form, in case you wondered
(http://wombat.doc.ic.ac.uk/foldoc/foldoc.cgi?query=CAF),
> Another way to obtain a linear time and space version is to define > fibonaci = fibonaci
> where
> fibonaci = [ 1,2:zipWith (+) fibonaci ( tl fibonaci ) ]
This runs in linear time and constant space.
All this assumes fixed size Ints. The next Clean release (1.3.3) will
have support for arbitrary precision integers.
Cheers,
Ronny Wichers Schreur