It doesn't make sense to mix map and println. If you want side
effects, use doseq instead of map:
(doseq [{a :a} [ {:a 1 :b 11} {:a 2 :b 22} {:a 3 :b 33}]] (println a))
{:a 1, :b 11}
{:a 2, :b 22}
{:a 3, :b 33}
If you don't want side effects, use str instead of println (you could
also use id
(map #(println %) [1 2 3 4]) prints 1 2 3 and 4
But what if the vector element is a hash with
[ {:a 1 :b 11} {:a 2 :b 22} {:a 3 :b 33}]?
can we dereference :a using %1, like (:a %1)?
If not, any alternative? maybe destructuring or something?
thanks
-sun
--~--~-~--~~~-