[Haskell] Re: factoring `if'

Serge D. Mechveliani mechvel at botik.ru
Mon Oct 11 06:50:52 EDT 2004


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 at botik.ru




More information about the Haskell mailing list