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
;; keywordize-at-keys: https://gist.github.com/vvvvalvalval/d31f8980045f3da3b3415092f6db32b6 | |
(defn associate-by [f coll] | |
(into {} (map (juxt f identity) coll))) | |
(defn associate-by-kkeyword-value | |
"Associate by key the key-work values and transform key to keyword, as well as it's value. | |
Generally, used for grouping data by the unique values in a coll, coming from requests." | |
[key coll] | |
(->> coll |