[Haskell-cafe] "show" for functional types
tomasz.zielonka at gmail.com
Sat Apr 1 13:33:53 EST 2006
On Sat, Apr 01, 2006 at 11:22:15AM +0100, Christopher Brown wrote:
> In haskell the following is true:
> f x + g x == g x + f x
Be careful, you will get a counter-example from someone.
In this example you assume that + is commutative for all
types. I don't think that the Haskell 98 report mandates this.
One safer example would be:
let y = f x in (y, y) == (f x, f x)
More information about the Haskell-Cafe