Function to add to Data.List

Henning Thielemann schlepptop at henning-thielemann.de
Sun Apr 6 08:35:04 UTC 2014


Am 06.04.2014 10:09, schrieb Herbert Valerio Riedel:
> On 2014-04-06 at 00:33:34 +0200, Henning Thielemann wrote:
>> 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"?

This might not always be an optimization, like a compiler cannot replace 
common sub-expressons by let in general.



More information about the Libraries mailing list