[Haskell-cafe] Redefining Disjunction

Bayley, Alistair Alistair_Bayley at invescoperpetual.co.uk
Wed Jun 13 09:51:04 EDT 2007

> [mailto:haskell-cafe-bounces at haskell.org] On Behalf Of PR Stanley
> 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

How many ways do you want? I think this is correct, and is only strict
in the first arg:

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

Confidentiality Note: The information contained in this message,
and any attachments, may contain confidential and/or privileged
material. It is intended solely for the person(s) or entity to
which it is addressed. Any review, retransmission, dissemination,
or taking of any action in reliance upon this information by
persons or entities other than the intended recipient(s) is
prohibited. If you received this in error, please contact the
sender and delete the material from any computer.

More information about the Haskell-Cafe mailing list