On Dec 6, 1:20 pm, CuppoJava <patrickli_2...@hotmail.com> wrote: > This is expected behavior. > > eg. (str (map identity [1 2 3])) > returns "clojure.lang.lazy...@7861" > > The way to think about it is, (str) asks for the string representation > of an object. The string representation of a lazy sequence in this > case is "clojure.lang.lazy...@7861". > > If you want the string representations of what's inside the lazy seq, > you can use the apply function. > > (apply str (map identity [1 2 3])) > "123"
API docs for the arguments to apply - "([f args* argseq])"; so the following is perhaps more straight-forward: (apply str (seq [1 2 3])) => "123" Additionally, the following works too in Cloure 1.0.0: (apply str [1 2 3]) => "123" ...though it does not follow from the API docs, which imply that the last argument to apply should be seq, and "(seq? [1 2 3])" => false. -Dave -- 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