What clojure tools should I be considering for doing syntax tree
manipulations? In general, I'm recursively matching patterns in subtrees
and rewriting them. The patterns are usually more complex than, say,
core.match patterns (e.g. match subtree having vector that contains term,
and split the
If I understand your question correctly, you want to manipulate a deeply
nested tree-like data structure, right? If that's correct, then perhaps a
combination of clojure.zip and multimethods will suit your needs. Zippers
provide a facility to transform (possibly) deeply nested immutable data
Zippers, clojure core functions work great if you don't need to query up
the tree as well as down.
For situations where I want pattern-matching like semantics, with the
ability to do arbitrary queries, I've reached for core.logic and/or
Datomic. It's pretty trivial to have some code that turns a
You may want to take a look at seqexp https://github.com/cgrand/seqexp and
zip-visit https://github.com/akhudek/zip-visit.
- James
On 3 July 2014 17:12, Brian Craft craft.br...@gmail.com wrote:
What clojure tools should I be considering for doing syntax tree
manipulations? In general, I'm