Mapping over a vector performing side-effects

clojure

Solution

(dorun (map println vector-of-lines))

`dorun` forces the evaluation of the lazy sequence, but also discards the individual results of each of item in the sequence. This is perfect for sequences that are purely for side-effects which is exactly what you want here.

Problem

I am attempting to iterate over a vector of "lines" in Clojure. Essentially, it looks like: ``` [{:start {:x 1 :y 3 :z 4}, :end {:x 3 :y 7 :z 0}}, ...] ``` I would like to apply a function that prints each of these "lines" onto a new line, ala: ``` (map #(println %) vector-of-lines) ``` but that doesn't appear to call the function. Should I not be using the "map" function in this instance?

Original source