I have a list of vectors like this:
([4 0] [4 2] [2 1] [4 1])
How can i increment the first element of every vector by a certain value X ?
desired output:
([5 0] [5 2] [3 1] [5 1])
This is my current approach, but i think i could be much simpler:
(defn shiftVector [oldVector number] (map vector (map #(+ (first %) number) oldVector ) (map #(second %) oldVector)))