Last active
November 3, 2020 18:32
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am very happy about this 🍰