On 31/10/2010 16:55, Brent Yorgey wrote: >> Note that the first parameter to commutative shadows the previous >> definition of com, I don't know if that's what you intended.
Does the following avoid the shadowing? infixl 5 `op` op :: Int -> Int -> Int x `op` y = (x + y) commutative op1 = \a b -> (a `op` b) == (b `op` a) This message has been scanned for content and viruses by the DIT Information Services E-Mail Scanning Service, and is believed to be clean. http://www.dit.ie _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe