Question: Haskell Programming -- 4. The exclusive-or function, xor :: Bool -> Bool -> Bool, takes two Bool values and returns -- True when precisely one
Haskell Programming
-- 4. The exclusive-or function, xor :: Bool -> Bool -> Bool, takes two Bool values and returns
-- True when precisely one is True, returning False otherwise. Define three versions of this
-- function using:
-- (a) pattern matching
-- (b) if then else
-- (c) the operator /= (not equal to)
--
-- Name your functions xor1, xor2 and xor3. Make your definitions as simple as possible.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
