Created
March 9, 2015 18:18
-
-
Save eyston/38574e7430c78cdda36c to your computer and use it in GitHub Desktop.
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
(def graph {:roots {} :nodes {}}) | |
;; end up wit ha structure like this after adding a node | |
(def graph {:roots {} :nodes {'Organization {:fields {:id {}}}}}) | |
;; do I do this? | |
(let [field (get-in graph [:nodes 'Organization :fields :id])] | |
;; ... | |
) | |
;; or ... | |
(defn get-field [graph node name] | |
(get-in graph [:nodes node :fields name])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment