On Dec 7, 8:12 pm, Andy Fingerhut <[email protected]> wrote: > Ugh. And if I were slightly lazier at pressing the send button, I would > have realized that the laziness of map and remove gives this short-circuit > evaluation. > > I generalized your example to allow the notation [- keyfn] as an argument > to specify descending order on that key, instead of ascending order. It > doesn't check its arguments carefully, but if you give it correct > arguments, it works :-)
Just use comp: (sort-by (multicmp f (comp - g)) coll) -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
