A solution using recur:
(defn flatten-maps-recur
([ms] (flatten-maps-recur ms ()))
([ms fl] (if-let [[f & r] (seq ms)]
(recur (concat (get f :c) r) (cons (dissoc f :c)
fl))
fl)))
Please, can you publish how are you doing your timings?
Thanks,
JM
On 13 abr, 16:51, Baishampayan Ghose <[email protected]> wrote:
> On Wed, Apr 13, 2011 at 8:19 PM, Meikel Brandmeyer <[email protected]> wrote:
> > Did you also check the eager one?
>
> Yes, I did. That one was much faster but still took double the time than mine.
>
> Regards,
> BG
>
> --
> Baishampayan Ghose
> b.ghose at gmail.com
--
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