Re: A re look at re-groups

2011-08-30 Thread Ken Wesson
On Tue, Aug 30, 2011 at 11:18 AM, Matt Smith wrote: > I have been studying patterns or the notion of idiomatic code in > Clojure.  The code in clojure.core has some good examples of proper > Clojure code and is well done.  For that reason I was a bit surprised > at the definition for re-groups: >

Re: A re look at re-groups

2011-08-30 Thread Matt Smith
On Aug 30, 10:16 am, Armando Blancas wrote: > > It seems like the loop/recur is non-idiomatic for this usage and could > > be done with either a map or reduce. > > It could be that it's faster that way. How does you code perform? Timings on this code for all three: (time (count (map re-match

Re: A re look at re-groups

2011-08-30 Thread Armando Blancas
> It seems like the loop/recur is non-idiomatic for this usage and could > be done with either a map or reduce. It could be that it's faster that way. How does you code perform? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, s

A re look at re-groups

2011-08-30 Thread Matt Smith
I have been studying patterns or the notion of idiomatic code in Clojure. The code in clojure.core has some good examples of proper Clojure code and is well done. For that reason I was a bit surprised at the definition for re-groups: (defn re-groups [^java.util.regex.Matcher m] (let [gc (.