> That works for functions with one argument list, but what about
> functions with multiple argument lists?

Hey, I was only answering the question you asked :)

If you want to do this in the general case, take this approach:

(defn fn-with-redis [f]
   (fn [& args]
     (redis/with-server *db*
       (apply f args))))

Treat it like memoization, modifying the root of the function var,  
adding metadata, whatever.

--~--~---------~--~----~------------~-------~--~----~
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