Hello,

On 10/27/05, Tom Hawkins <[EMAIL PROTECTED]> wrote:
> ...
> >> data Expr = Constant Int | Addition Expr Expr
> >>
> >> cyclic :: Expr
> >> cyclic = Addition (Constant 1) cyclic
> ...
>  > And there is nothing that says that your definition of cyclic
> > will actually have a cycle in the implementation.
>
> Would you elaborate?  Are you referring to the possibility that
> "cyclic", or at least the second Addition operand, may not be evaluated?

An implementation that does not do updating of values (i.e. uses "call
by name" instead of "call by need") will not generate a cyclic
structure;  instead every time you ask for the value of "cyclic" it
will create a new expression.
-Iavor
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to