[Haskell-cafe] Redefining Disjunction

Chris Mears chris at cmears.id.au
Wed Jun 13 09:49:24 EDT 2007


PR Stanley <prstanley at ntlworld.com> writes:

> 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

In the same spirit:

f False False = False
f _ _ = True


More information about the Haskell-Cafe mailing list