<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">-1 </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">We already have a 'dup' function defined in base but it does something completely different. I see no reason to add a mild abbreviation and force Haskellers to add yet another silly word to their vocabulary. Library authors can already create their own set of vocabulary by importing a common internal module. Base doesn't need to get involved.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 24, 2019 at 10:06 AM Cale Gibbard <<a href="mailto:cgibbard@gmail.com">cgibbard@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The advantage of (\x->(x,x)) as a name is that for a small number of<br>
additional characters, the meaning is obvious even if you didn't know<br>
that this thing existed before, and it generalises nicely -- to other<br>
tuples, or a change from using pairs to some other data structure.<br>
<br>
Now, I would actually support the idea of having a type class for<br>
categories with such a diagonal map. But this already exists:<br>
<br>
<a href="http://hackage.haskell.org/package/categories-1.0.7/docs/Control-Category-Cartesian.html" rel="noreferrer" target="_blank">http://hackage.haskell.org/package/categories-1.0.7/docs/Control-Category-Cartesian.html</a><br>
-- See 'diag'.<br>
<br>
One thing I think would be really nice is for the proc/do (Arrow)<br>
notation to be defined in terms of the stuff which is currently in the<br>
'categories' package, which ultimately might mean blessing that stuff<br>
a little more. Of course, Conal has also experimented with<br>
interpreting lambdas in terms of similar classes of operations, which<br>
is an extremely powerful idea as well.<br>
<br>
On Wed, 24 Jul 2019 at 09:54, Vladislav Zavialov <<a href="mailto:vladislav@serokell.io" target="_blank">vladislav@serokell.io</a>> wrote:<br>
><br>
> map (\x->(x,x)) is quite a punctuation soup compared to ‘map dup’.<br>
><br>
> - Vlad<br>
><br>
> > On 24 Jul 2019, at 16:48, Cale Gibbard <<a href="mailto:cgibbard@gmail.com" target="_blank">cgibbard@gmail.com</a>> wrote:<br>
> ><br>
> > Does lambda not exist for a reason?<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>
><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>