Skip to content

Instantly share code, notes, and snippets.

@edbond
Created February 3, 2014 14:37
Show Gist options
  • Select an option

  • Save edbond/8784899 to your computer and use it in GitHub Desktop.

Select an option

Save edbond/8784899 to your computer and use it in GitHub Desktop.
(defn query-node-with-path
([[ s & _ :as source ]
{type :type children :children wf :word-fragment :as node}
acc]
(prn "source " source)
(prn "s " s)
(prn "type " type)
(prn "node " node)
(prn "acc " acc)))
;; user> (query-node-with-path [1 2 3 4 5] {:type "node" :children "children"} :accumulator)
;; "source " [1 2 3 4 5]
;; "s " 1
;; "type " "node"
;; "node " {:children "children", :type "node"}
;; "acc " :accumulator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment