Simon wrote:

>  For example, in this case we could write (rather less elegantly)
>  
>  g2 a | (x:xs) <- h a, (y:ys) <- h x = if y<0 then e1
>                                        else if y>0 then e2
>                                        else e3
>
> To avoid this difficulty with functions like g2...

Why does the Haskell community have such an antipathy to if...then...else...?
Tony said that choice of construct is a matter of personal style. Nonetheless,
I think that this whole debate crystalises a consensus that guards are
prefereable to conditional expressions.

Greg Michaelson



Reply via email to