Last active
January 13, 2017 19:26
-
-
Save tdouce/99536ba34029166861793bbbfaa2329e to your computer and use it in GitHub Desktop.
dedup om query server side
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
(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