Please use prn insteadof println. By default, pr and prn print in a way that objects can be read by the reader,but print and println produce output for human consumption.
2012/10/31 arekanderu <arekand...@gmail.com> > Hello all, > > I have the following code: > > (def my-hash {"1" {:a-key {:value "a value"} :another-key "another value" >>> :a-third-key []} >> >> "2" {:a-key {:value "a value"} :another-key "another >>> value" :a-third-key []}} >> >> > In the following example i get the following result: > > user=> (doseq [[id item] my-hash] (println item)) > > {:a-key {:value a value}, :another-key another value, :a-third-key []} > > {:a-key {:value a value}, :another-key another value, :a-third-key []} > > nil > > > On the above example, it looks *almost* normal to me. For instance, why > *{:value > a value}* is not returned as *{:value "a value"} *? Same goes for *:another > key* > It still looks like a hashmap though. Isn't it? > > The behavior however which confused me even more is the following: > > user=> (doseq [[id item] my-hash >> key (:a-key item)] >> (println key)) >> [:value a value] >> [:value a value] >> nil > > > I was expecting the above to return: > > {:value "a value"} >> {:value "a value"} >> nil > > > Can someone explain to me why vector is being returned and how can I > achieve the result I was expecting? What am I missing here? Am i misusing > the doseq <http://clojuredocs.org/clojure_core/clojure.core/doseq>bindings? > > Thank you for your time > > -- > 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 -- 庄晓丹 Email: killme2...@gmail.com xzhu...@avos.com Site: http://fnil.net Twitter: @killme2008 -- 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