
3 Nov
2009
3 Nov
'09
8:26 a.m.
Excerpts from Neil Brown's message of Tue Nov 03 13:45:42 +0100 2009:
Hi,
I was thinking about some of my code today, and I realised that where I have an arrow in my code, A b c, the type (A b) is also a functor. The definition is (see http://www.haskell.org/ghc/docs/latest/html/libraries/base/Control-Arrow.htm...):
fmap = (^<<) -- Or, in long form: fmap f x = arr f <<< x
Out of curiosity, and since this is a typical haskell-cafe question, does this definition of fmap hold for all arrows?
Yes, as shown by the 'WrappedArrow' newtype: http://www.haskell.org/ghc/docs/latest/html/libraries/base/Control-Applicati... -- Nicolas Pouillard http://nicolaspouillard.fr