Function to add to Data.List
wren romano
winterkoninkje at gmail.com
Wed Apr 9 22:08:59 UTC 2014
On Sun, Apr 6, 2014 at 9:39 PM, Carter Schonwald
<carter.schonwald at gmail.com> wrote:
> On Sun, Apr 6, 2014 at 9:02 PM, Edward Kmett <ekmett at gmail.com> wrote:
>>
>> There is some precedent for 'sortOn' as the naming convention should we
>> choose to go ahead with it.
>>
>> http://lukepalmer.wordpress.com/2009/07/01/on-the-by-functions/
>>
>> Having some mechanism by which we can explicitly request the Schwartzian
>> transform like that as opposed to 'element by element' By functions strikes
>> me personally as a good idea and sufficiently non-trivial to pass the
>> "Fairbairn threshold" in my book.
>>
>> +1 from me.
>
> +1 here, seems like a nice design
+1 for adding the decorate-sort-undecorate function to the API.
-1 for adding RULES, since this transformation is not always an optimization.
+1 for the name sortOn. Luke Palmer discusses the *On naming scheme,
and I've seen/used it elsewhere.
-0 for the name sortWith. I think "with" is too generic a preposition;
it works best as a two-place predicate imo (e.g., fooWithKey)
--
Live well,
~wren
More information about the Libraries
mailing list