Re: Basic vector assoc

2012-06-12 Thread Gabo
Hello, thank you very much for your answer, it is exactly what I was looking for ! Le vendredi 8 juin 2012 13:35:36 UTC+2, Gabo a écrit : > > Hello, > > I'm a beginner with Clojure and trying some basic stuff. > I'm actually working on a simple function which would repl

Basic vector assoc

2012-06-08 Thread Gabo
Hello, I'm a beginner with Clojure and trying some basic stuff. I'm actually working on a simple function which would replace the nth element of a vector. I'm using this function (def ids-in-use (ref [1 2 3])) (defn update-vector [v tid] (assoc v tid 10)) (update-ids-in-use [2]) The problem is