E.g., I have a vector [1, 2, 3]
, and I want to update the second element so that the vector becomes [1, 5, 3]
. In other languages, I would just do something like array[1] = 5
, but I'm not aware of anything that would allow me to do this easily in Clojure.
Thoughts on how to accomplish this, or on whether I should be using a different data structure?