It occurs to me that another way of doing this is to map a new list
and then use the min fn.  something like:

(apply min (map #(Math/abs (- % 136)) xs))

maybe this is better and involves less calculations?



On Sep 25, 2:19 pm, Glen Rubin <rubing...@gmail.com> wrote:
> min-key looks good!  thx guys!!!
>
> On Sep 25, 10:44 am, Nicolas Oury <nicolas.o...@gmail.com> wrote:
>
>
>
> > On Sat, Sep 25, 2010 at 3:40 PM, Jules <julesjac...@gmail.com> wrote:
> > > Maybe this: (min-key #(abs (- % 136)) xs)
>
> > Wouldn't that be (apply min-key #(abs (- % 136)) xs)?

-- 
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