Skip to content

Instantly share code, notes, and snippets.

Created January 19, 2018 08:49
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 anonymous/c32a2a95101d257728189bafb4bdd86a to your computer and use it in GitHub Desktop.
Save anonymous/c32a2a95101d257728189bafb4bdd86a to your computer and use it in GitHub Desktop.
(def data [{:key ["test" "123"]} {:key ["test" "456"]} {:key ["yolo" "789"]}])
#'boot.user/data
(map :key data)
(["test" "123"] ["test" "456"] ["yolo" "789"])
(map (comp first :key) data)
("test" "test" "yolo")
(map (comp (partial = "test") first :key) data)
(true true false)
(filter (comp (partial = "test") first :key) data)
({:key ["test" "123"]} {:key ["test" "456"]})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment