On Mon, Jul 4, 2011 at 11:31 AM, Tamas Papp tkpapp@gmail.com wrote:
Why do some CL library functions have :key arguments?
[...]
but it is a bit cumbersome. I can make my code simpler by relying on calls like
(quantiles (map 'vector key vector) quantiles)
This not only conses "a bit more", it also duplicates traversal efforts - The original list must be traversed, and the consed-up list of key values as well. I think it is prudent that the CL library functions offer ways to reduce consing for cases where "a bit" is too much (and "a bit" can become a lot if a program operates on long lists).
-Hans