Re: [Haskell-beginners] Exercise of "Programming with Arrows"

I agree with "no-op assembly line", but when I'm using `first` on a
On Tue, Oct 8, 2013 at 4:08 AM, Thiago Negri
I mean, I think I need to guarantee that this definition holds:
`g *** f` is the same as `first g >>> swap >>> first f >>> swap`
Excellent! Let's turn to laws and definitions to be _precise_ in what we're saying.
If my implementation of `first` uses a real no-op assembly line for `c` (i.e., `arr id`), then I would lose the stream.
To that end, consider this easy problem: using (1) the arrow laws that you know off the top of your head, and (2) the above definition of (***) can you show that g *** (arr id) = first g? Because arr id, as you noted, is a no-op. Do you see what's going on? -- Kim-Ee
participants (1)
-
Kim-Ee Yeoh