On Fri, Dec 17, 2010 at 11:38 AM, Michael wrote:
>
> Ken/Alex,
>
> Thanks for taking the time to look at this and providing explanations/
> ideas. Now I realize I can use forms instead of strings. I was
> looking for a way to specify a collection of strings and be able to
> expand them out under
Ken/Alex,
Thanks for taking the time to look at this and providing explanations/
ideas. Now I realize I can use forms instead of strings. I was
looking for a way to specify a collection of strings and be able to
expand them out under different bindings.
(def v 0)
(def coll ['(str "v: " v) '(<<
Michael writes:
> I'm trying to use << from clojure.contrib.strint perform string
> interpolation in a string variable. The following,
> (def s "v: ~{v}")
> (println (<< (str s)))
> (println (<< s))
This is not going to be possible (at least not efficiently: you could
technically do itwith &en
On Thu, Dec 16, 2010 at 2:56 PM, Michael wrote:
>
> I'm trying to use << from clojure.contrib.strint perform string
> interpolation in a string variable. The following,
>
> (ns strint-test (:use clojure.contrib.strint))
>
> (def v 1)
> (println (<< "v: ~{v}"))
>
> (def s "v: ~{v}")
> (println (<<
I'm trying to use << from clojure.contrib.strint perform string
interpolation in a string variable. The following,
(ns strint-test (:use clojure.contrib.strint))
(def v 1)
(println (<< "v: ~{v}"))
(def s "v: ~{v}")
(println (<< (str s)))
(println (<< s))
results in
v: 1
v: ~{v}
java.lang.Runt