<div dir="ltr">If we're going to add this we should add the symmetric operation for<div><br></div><div>jam :: Either a a -> a</div><div><br></div><div>to Data.Either. (Name taken from Conal's compiling to categories code.)</div><div><br></div><div>My own code has called these diag and codiag respectively. I happily yield to a nicer convention.</div><div><br></div><div>I have no real preference for whether we do the simple version in Data.Tuple (which has a lot of precedent, as Data.Tuple tends to have lots of little simple combinators that could be done more generally as arrows) or moving it into Control.Arrow.</div><div><br></div><div>-Edward</div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Oct 28, 2018 at 12:07 PM Ivan Perez <<a href="mailto:ivan.perez@keera.co.uk">ivan.perez@keera.co.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 28/10/18 09:48, Vanessa McHale wrote:<br>
> According to GHCi,<br>
><br>
> λ:> import Control.Arrow<br>
> λ:> :t (id &&& id)<br>
> (id &&& id) :: b -> (b, b)<br>
><br>
> That is, this implementation has type a -> (a, a) as well.<br>
Yes, yes, that's what I meant by "it works for functions as well (since <br>
they are arrows)"<br>
<br>
Ivan<br>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</blockquote></div>