I'm trying out redis-clojure. Right now, my code looks like this:

(defn one []
  (redis/with-server *db*
    (...)))

(defn two []
  (redis/with-server *db*
    (...)))

(defn three []
  (redis/with-server *db*
    (...)))

It feels wrong to repeat myself every time I need to use the database.
Is there a way to abstract out the (redis/with-server) part?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to