On Wed, May 19, 2010 at 7:13 PM, braver <delivera...@gmail.com> wrote:

> On May 18, 11:45 am, Christophe Grand <christo...@cgrand.net> wrote:
> > (defn sorted-by? [pred s]
> >   (if-let [ns (next s)]
> >     (let [[a b] s]
> >       (and (pred a b) (recur pred ns)))
> >     true))
>
> > (defn reps-sorted2? [dreps]
> >  (every? #(sorted-by? >= (map first (val %))) dreps))
> >
> > and it should be as fast as the iterative version.
>
> Should be sorted-by? < for my purposes.  Still slower than the loop by
> 5-6x.
>

Can you post a representative data sample?

Thanks,

Christophe

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