Request: Can clojure.contrib.walk provide a reduce type operation?
Currently the clojure.contrib.walk code provides a nice way to perform a depth first map operation on trees. However, I need to fold across a tree. It would be nice if walk provided this. --~--~-~--~~~---~--~~ 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 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 -~--~~~~--~~--~--~---
Re: Request: Can clojure.contrib.walk provide a reduce type operation?
if your walk pushes the items into a Queue, you can just reduce across the Queue On Wed, Mar 11, 2009 at 9:24 AM, Jeffrey Straszheim wrote: > Currently the clojure.contrib.walk code provides a nice way to perform a > depth first map operation on trees. However, I need to fold across a tree. > It would be nice if walk provided this. > > > > -- And what is good, Phaedrus, And what is not good— Need we ask anyone to tell us these things? --~--~-~--~~~---~--~~ 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 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 -~--~~~~--~~--~--~---
Re: Request: Can clojure.contrib.walk provide a reduce type operation?
Yeah, I figured something like that out, but it was non-obvious. It might be nice helper function sometime down the road. On Wed, Mar 11, 2009 at 3:49 PM, Kevin Downey wrote: > > if your walk pushes the items into a Queue, you can just reduce across the > Queue > > On Wed, Mar 11, 2009 at 9:24 AM, Jeffrey Straszheim > wrote: > > Currently the clojure.contrib.walk code provides a nice way to perform a > > depth first map operation on trees. However, I need to fold across a > tree. > > It would be nice if walk provided this. > > > > > > > > > > > -- > And what is good, Phaedrus, > And what is not good— > Need we ask anyone to tell us these things? > > > > --~--~-~--~~~---~--~~ 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 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 -~--~~~~--~~--~--~---
Re: Request: Can clojure.contrib.walk provide a reduce type operation?
On Mar 11, 12:24 pm, Jeffrey Straszheim wrote: > Currently the clojure.contrib.walk code provides a nice way to perform a > depth first map operation on trees. However, I need to fold across a tree. > It would be nice if walk provided this. Hi Jeffrey, I agree it would be a useful feature. I'll look at implementing it, should be doable. -Stuart Sierra --~--~-~--~~~---~--~~ 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 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 -~--~~~~--~~--~--~---