Skip to content

Instantly share code, notes, and snippets.

@luxbock

luxbock/foo.clj Secret

Created June 12, 2016 15:42
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 luxbock/93d61ccd38b340a99dfd3a93682b5f6c to your computer and use it in GitHub Desktop.
Save luxbock/93d61ccd38b340a99dfd3a93682b5f6c to your computer and use it in GitHub Desktop.
(let [foo-map {:foo #{1 2 3} :bar #{5 6}}]
(transform [ALL]
(fn [[report rows]]
[report
(transform [ALL]
(fn [r]
(if (-> foo-map report (get r))
(str r)
(inc r)))
rows)])
{:foo [1 2 4 5]
:bar [2 3 5 6]}))
;; => {:foo ["1" "2" 5 6], :bar [3 4 "5" "6"]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment