Thinking in Clojure - static fields?

2009-01-27 Thread Whirlycott
I'm new to Clojure and I'm wondering how I'm supposed to be thinking about various things. I want to use the c3p0 database connection pool in a Clojure app. In Java, I would simply create an instance of this class and either assign it to a static field or perhaps make it available in a

Thinking in Clojure - static fields?

2009-01-27 Thread Whirlycott
I'm new to Clojure and I'm wondering how I'm supposed to be thinking about various things. I want to use the c3p0 database connection pool in a Clojure app. In Java, I would simply create an instance of this class and either assign it to a static field or perhaps make it available in a

Re: Thinking in Clojure - static fields?

2009-01-27 Thread Timothy Pratley
Here is one way: (let [dbc (make-db)] (defn get-apples [] (.query dbc select * from apples))) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: Thinking in Clojure - static fields?

2009-01-27 Thread Chouser
On Mon, Jan 26, 2009 at 11:13 PM, Whirlycott p...@whirlycott.com wrote: I'm new to Clojure and I'm wondering how I'm supposed to be thinking about various things. I want to use the c3p0 database connection pool in a Clojure app. In Java, I would simply create an instance of this class and