If we're going to add this we should add the symmetric operation for jam :: Either a a -> a to Data.Either. (Name taken from Conal's compiling to categories code.) My own code has called these diag and codiag respectively. I happily yield to a nicer convention. 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. -Edward On Sun, Oct 28, 2018 at 12:07 PM Ivan Perez <ivan.perez@keera.co.uk> wrote:
On 28/10/18 09:48, Vanessa McHale wrote:
According to GHCi,
λ:> import Control.Arrow λ:> :t (id &&& id) (id &&& id) :: b -> (b, b)
That is, this implementation has type a -> (a, a) as well. Yes, yes, that's what I meant by "it works for functions as well (since they are arrows)"
Ivan _______________________________________________ Libraries mailing list Libraries@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries