Can you overload + in haskell?
Yes (+) is part of the Num typeclass, and everyone seems to feel you can’t define (*) etc for your type, but I strongly disagree. newtype Pair a b = Pair (a,b) deriving (Eq,Show) I think Pair a b would be nicer, or we could even just use the type (a,b) directly, but… This is … Read more