On 15 November 2010 14:17, Tom Hall <thattommyh...@gmail.com> wrote:

> Hi,
>
> I think a better usage for max-key would be
> (max-key f someseq)
> rather than passing the values as args.
>
> I used
> (defn max-key-seq [f someseq]
>  (apply max-key (into [f] someseq)))
> to make it do what I wanted
>
> Is there a better way?
>

You should be able to use (apply max-key f someseq); apply takes a variable
number of args, and only the last is expanded.

Regards,
Stuart

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to