Skip to content

Instantly share code, notes, and snippets.

@mnemnion
Last active November 3, 2020 18:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mnemnion/6243754 to your computer and use it in GitHub Desktop.
Save mnemnion/6243754 to your computer and use it in GitHub Desktop.
a tree-seq function for enlive style trees or graphs in clojure. Made for instaparse, may not fit all cases.
(defn e-tree-seq
"tree-seqs enlive trees/graphs, at least instaparse ones"
[e-tree]
(if (map? (first e-tree))
(tree-seq (comp seq :content) :content (first e-tree))
(tree-seq (comp seq :content) :content e-tree)))
@harold
Copy link

harold commented Nov 3, 2020

I am very happy about this 🍰

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment