Skip to content

Instantly share code, notes, and snippets.

@dabd
Created November 25, 2013 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dabd/7641881 to your computer and use it in GitHub Desktop.
Save dabd/7641881 to your computer and use it in GitHub Desktop.
(defrecord Node [value label])
(def a-tree
[(Node. 1 "root") [(Node. 2 "two") [(Node. 3 "three") (Node. 4 "four")]]])
(w/postwalk (fn [x] (if (instance? Node x) (:value x) x)) a-tree)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment