Skip to content

Instantly share code, notes, and snippets.

@mneedham
Created July 16, 2011 10:53
Show Gist options
  • Select an option

  • Save mneedham/1086256 to your computer and use it in GitHub Desktop.

Select an option

Save mneedham/1086256 to your computer and use it in GitHub Desktop.
(defn yaks [doc]
; ...
{:tag :Yaks :content[(map (ƒ [s] {:tag :Yak :content [s]}) yaks)]
(defn build-map [doc]
{:tag :meta :content
[{:tag :Foo :content [(xml1-> doc zf/descendants :Bar text)]}
{:tag :Bar :content [(xml1-> doc zf/descendants :Foo text)]}
{:tag :Baz :content [(xml1-> doc :Baz text)]}
(yaks doc)
; currently reads => {:tag :Yaks, :content [({:tag :Yak, :content ["clojure yak"]})]}
; I want it to read => {:tag :Yaks, :content [{:tag :Yak, :content ["clojure yak"]}]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment