Function to add to Data.List

Herbert Valerio Riedel hvr at gnu.org
Sun Apr 6 08:09:24 UTC 2014


On 2014-04-06 at 00:33:34 +0200, Henning Thielemann wrote:
> Am 06.04.2014 00:27, schrieb Niklas Haas:

[...]

>> This already exists in the form of
>>
>> sortBy . comparing
>>
>> or
>>
>> sortBy (comparing f)
>
> Not exactly, because sortByKey memorizes the results of 'f' and
> (sortBy . comparing) recomputes 'f' all the time.

...what about a RULE that replaces "sortBy . comparing" by an internal
non-exported "sortByKey"?


More information about the Libraries mailing list