31 Aug
2004
31 Aug
'04
9:18 a.m.
On Thu, Aug 12, 2004 at 02:16:05PM +0900, jeff polakow wrote:
Why is the following not an arrow?
newtype ListMap i o = LM ([i] -> [o] instance Arrow ListMap where pure f = LM (map f) LM f >>> LM g = LM (g . f) first (LM f) = LM ((uncurry zip) . (cross f id) . unzip)
Consider the functor and unit laws for first when f produces an output list of a different length to its input.