Advertisement
Guest User

Untitled

a guest
Feb 27th, 2015
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. (def my-db (atom {}))
  2. (defn add [table doc] (swap! my-db update-in [table] conj doc))
  3. (defn search-by-name [table name]
  4. (filter #(= name (:name %)) (get @my-db table)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement