11 Oct
2004
11 Oct
'04
10:50 a.m.
Thanks for the help! People note that in my example of
(1) (\ x -> (if p x then foo (g x) else foo (h x)) ...)
(2) (\ x -> foo ((if p x then g x else h x)) )
p x may be _|_, and this makes (1) not equivalent to (2). ----------------- Serge Mechveliani mechvel@botik.ru
11 Oct
11 Oct
11:08 a.m.
New subject: factoring `if'
Serge D. Mechveliani wrote:
[...]
People note that in my example of
(1) (\ x -> (if p x then foo (g x) else foo (h x)) ...)
(2) (\ x -> foo ((if p x then g x else h x)) )
p x may be _|_, and this makes (1) not equivalent to (2).
Yes. I think, the point is that laziness does not only have something to do with execution behavior but also with the meaning of expressions as soon as _|_ values are considered.
Serge Mechveliani
Wolfgang
7994
Age (days ago)
7994
Last active (days ago)
1 comments
2 participants
participants (2)
-
Serge D. Mechveliani -
Wolfgang Jeltsch