I think the point of this style of api is you just define your functions like
(defn one [] )
(defn two [] )
and call the function like
(redis/with-server *db*
(one) (two))
On Thu, Oct 22, 2009 at 2:44 PM, Radford Smith <[email protected]> wrote:
>
> 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?
>
> >
>
--
And what is good, Phaedrus,
And what is not good—
Need we ask anyone to tell us these things?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---