<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, May 27, 2016 at 3:02 PM, Edward Kmett <span dir="ltr"><<a href="mailto:ekmett@gmail.com" target="_blank">ekmett@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Note: in general we have chosen to supply By methods, rather than On methods, because he on combinator can be used to get one in terms of the other. We explicitly added sortOn because it can use a Schwartzian transform to be more efficient than sortBy (comparing `on` f).<br>
<br>
These don't have direct analogues there, however. So that usual argument against adding these sorts of methods doesn't hold up.<br>
<br>
One thing of note is that what you are asking for here is usually called argmin and argmax. Perhaps consistency with the rest of mathematics should trump consistency with sortOn.<br>
<br>
IIRC, We already have Arg in Data.Semigroup for use with the Min and Max semigroups for this purpose, so such naming would fit.<br></blockquote><div><br></div><div>I'm not particularly concerned about the names that we decide. I just used those names because I thought they were intuitive for the current community. I'm happy with any other names that make sense.</div></div></div></div>