On 10/24/06, Henning Thielemann <[EMAIL PROTECTED]> wrote:
For processing conditions, the if-then-else syntax was defined in
Haskell98. However it could be simply replaced by the function if' with

if' :: Bool -> a -> a -> a
if' True  x _ = x
if' False _ y = y

I support the inclusion of if' because it is the Bool catamorphism,
but I would structure its arguments as (a -> a -> Bool -> a) because
that facilitates use of the currying.

I don't think it's an effective replacement for if/then/else because
using if' usually requires a bunch of harder-to-read () instead of
nice delimiting reserved words.

--
Taral <[EMAIL PROTECTED]>
"You can't prove anything."
   -- Gödel's Incompetence Theorem
_______________________________________________
Haskell-prime mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-prime

Reply via email to