Skip to content

Instantly share code, notes, and snippets.

@tdouce
Last active January 13, 2017 19:26
Show Gist options
  • Save tdouce/99536ba34029166861793bbbfaa2329e to your computer and use it in GitHub Desktop.
Save tdouce/99536ba34029166861793bbbfaa2329e to your computer and use it in GitHub Desktop.
dedup om query server side
(defn dedupe-query
[q]
(-> (reduce
(fn [query q]
(cond
(map? q)
(into query (mapcat val q))
:else
(conj query q)))
#{} q)
vec))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment