[Haskell-cafe] Question, re: Typeclassopedia Ex. 4.2.1
capn.freako at gmail.com
Tue Sep 29 14:48:05 UTC 2015
In trying to solve exercise 4.2.1 in Typeclassopedia, I’ve come up with the following:
pure f <*> x = pure (flip ($)) <*> x <*> pure f
pure (flip ($)) <*> x <*> pure f = (interchange)
pure (flip ($)) <*> pure ($ f) <*> x = (homomorphism)
pure (flip ($) ($ f)) <*> x = (definition of flip)
pure ($ ($ f)) <*> x = (interchange)
x <*> pure ($ f) = (interchange) (Is this step valid?)
pure f <*> x
Is the last step in my proof valid?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe