
24 Oct
2006
24 Oct
'06
12:52 p.m.
On 10/24/06, Henning Thielemann
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