Skip to content

Instantly share code, notes, and snippets.

@gfredericks
Created April 21, 2011 20:52
Show Gist options
  • Save gfredericks/935442 to your computer and use it in GitHub Desktop.
Save gfredericks/935442 to your computer and use it in GitHub Desktop.
;; Before...
(defn find-samples-by-identifier
[identifier]
(:id (first @(-> (table config/*db* :samples)
(select (where (= :identifier identifier)))))))
;; After
(defn find-samples-by-identifier
[identifier]
(-> (table config/*db* :samples)
(select (where (= :identifier identifier)))
deref
first
:id))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment