Generic Data.List.partition evan at
Thu Oct 20 19:12:32 UTC 2016

I've been curious in the past why Data.List.partition has not found a more
generic implementation. I always assumed this was because of performance.

I've given the performance hypothesis a test and it seems that a generic
implementation outperforms the list implementation. I'm not terribly sure
why this is the case, but I also haven't dumped core.

Implementation and bench:

Should this function be made generic? This implementation is surely
leveraging the perf characteristics of the Monoid instance of List. Other
types could have terrible performance.

- Evan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Libraries mailing list