[Haskell-cafe] Redefining Disjunction

PR Stanley prstanley at ntlworld.com
Wed Jun 13 09:37:37 EDT 2007


Hi
Can you think of a fourth way of redefining disjunct using pattern matching?
vee :: Bool -> Bool -> Bool
vee _ True = True
vee True _ = True
vee _ _ = False

ve :: Bool -> Bool -> Bool
ve True True = True
ve True False = True
ve False True = True
ve False False = False

v :: Bool -> Bool -> Bool
v True b = True
v b True = True
v b False = b
v False b = b

Thanks
Paul



More information about the Haskell-Cafe mailing list