Michael Goodrich wrote:

Also I know what strict means, but why are you saying that baz is strict?


Because otherwise the loop would be OK. For instance if baz were

baz x = 100   -- lazy

then the equations could be evaluated starting from

c0 = baz z0 = 100
rd0 = c0*c0*m = 100*100*m
 -- etc.

and eventually all the variables could be defined.

Another example: the pair constructor (,) is lazy so

c = (3, fst c)  -- "loop" on c

is OK, and defines c=(3,3).

Regards,
Roberto Zunino.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to