I've uploaded tree-utils.clj to the files section. http://groups.google.com/group/clojure/web/tree-utils.clj Here are some example usages:
Subtracting two (or more) trees element-by-element: user=> atree [[1 2] [3 4 5] [6 7]] user=> btree [[2 3] [4 5 6] [7 8]] user=> (tree-reduce - atree btree) ((-1 -1) (-1 -1 -1) (-1 -1)) Recursively summing all the elements in a tree: user=>(tree-apply #(reduce + %) true true atree) 28 user=>(tree-apply #(reduce + %) true true btree) 34 I think these are generally useful, so I'm just looking for some feedback and possible inclusion in contrib. Thanks! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---