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 replace the nth > element of a

Re: Basic vector assoc

2012-06-08 Thread Sean Corfield
On Fri, Jun 8, 2012 at 4:35 AM, Gabo wrote: > I'm actually working on a simple function which would replace the nth > element of a vector. (assoc v n e) ;; returns a new vector with the nth element of v replaced by e Note that it does not change the original vector. > (def ids-in-use (ref [1 2