12 Aug
2004
12 Aug
'04
5:16 a.m.
Hello, 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) thanks, Jeff
31 Aug
31 Aug
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.
8031
Age (days ago)
8050
Last active (days ago)
1 comments
2 participants
participants (2)
-
jeff polakow -
Ross Paterson