Deniz Dogan wrote: >> instance Num Bool where >> (+) False = id >> (+) True = not >> >> (*) True True = True >> (*) _ _ = False >> > > Isn't "XOR" for booleans (/=)?
Oh right. And (*) would be (&&):
instance Num Bool where
(+) = (/=)
(*) = (&&)
-- ...
//Stephan
--
Früher hieß es ja: Ich denke, also bin ich.
Heute weiß man: Es geht auch so.
- Dieter Nuhr
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe
