I have this function:
(defn wrap [x]
(str "%" x "%"))
and I do
bf=> (str "boo hoo " (map wrap ["fdfd" "ggfs"]))
"boo hoo clojure.lang.LazySeq@9e050eb0"
This looks odd to me, but if the powers that be consider this to be
the right behavior of str then my question is: what do I need to do do
get what I want?
-AT
Use apply: (apply str "boo hoo " (map wrap ["fdfd" "ggfs"])).
Sincerely
Meikel
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@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+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
--
And what is good, Phaedrus,
And what is not good—
Need we ask anyone to tell us these things?
if you really want the seq to be stringified instead of the elements,
just do (str "boo hoo " (seq (map (wrap [...]))))
I suppose lazy seqs are so lazy they won't even bother to provide a
string representation of themselves without coercion :)