On Tue, Oct 8, 2013 at 4:08 AM, Thiago Negri <evohunz@gmail.com> wrote:
> I agree with "no-op assembly line", but when I'm using `first` on a processor, I want to process the first stream *only*. The second stream should remain as it was not touched, so future processors will receive the same sequence from the second stream.
We are in violent agreement!
> 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