title: Adding element to a vector (conj function) and keep changes
body: <p>The goal of my function is to read the input <em>interpreting-vector</em> and return a value after analysis.</p>
  
  <p>To archieve my goal I need to add a string to a vector and keep the changes.
  The conj function return a new vector but doesn't change my variable <strong>eq_code</strong> actually.</p>
  
  <p><em>(conj eq_code (get-in vector [3 1]))</em> doesn't change the value of the vector <strong>eq_code</strong>. I don't think repeat a let function with the variable <strong>eq_code</strong> would solve my problem.</p>
  
  <p>Here is a piece of my code : </p>
  
  <pre><code>(defn interpreted-lang-while [interpreting-vector]
    (let [vector interpreting-vector
      ;before_if code added to eq_code
      eq_code [(str (get-in vector [1 1]) "0;")]]
  
  
      (def interpret-eval-eq_code (-&gt;&gt; (apply str eq_code) lang1-parser lang1-interpret)) 
  
  
      (while 
        ;eval the code (last value contains condition)
        (not= 0 (do (conj eq_code (str (get-in vector [2 1]) ";"))(interpret-eval-eq_code) (prn (str "Eval condition : " (apply str eq_code)))))
        ;if the last value is not 0 =&gt;add the statement_OK and eval the condition again
        (do (conj eq_code (get-in vector [3 1])) (prn (str "End loop code : " (apply str eq_code)))))
       (conj vector (str (interpret-eval-eq_code) ";")) 
  
  ;last values contains 0 =&gt;end of the while
  (prn (str "Code equivalent : " eq_code)) 
  (conj eq_code (get-in vector [4 1])) 
  (interpret-eval-eq_code)))
  </code></pre>
  
  <p>I execute the following line with clojure : </p>
  
  <pre><code> (interpreted-lang-while [:LangWHILE [:before_while "a=1; b= a+2; c="] [:condition_expression "a-3"] [:statements_OK "a=a+1;b=b+2;"] [:after_while " c+1;"]])
  </code></pre>
  
  <p>I get the following output on the terminal : </p>
  
  <pre><code>project.core=&gt; "Eval condition : a=1; b= a+2; c=0;"
  "End loop code : a=1; b= a+2; c=0;"
  "Eval condition : a=1; b= a+2; c=0;"
  "End loop code : a=1; b= a+2; c=0;"
  "Eval condition : a=1; b= a+2; c=0;"
  "End loop code : a=1; b= a+2; c=0;"
  &lt;Infinite loop ...&gt;
  </code></pre>
  
  <p>Instead of </p>
  
  <pre><code>project.core=&gt; "Eval condition : a=1; b= a+2; c=0;a-3;"
  "End loop code : a=1; b= a+2; c=0;a-3;a=a+1;b=b+2;"
  "Eval condition : a=1; b= a+2; c=0;a-3;a=a+1;b=b+2;a-3;"
  &lt;And so on ..&gt;
  </code></pre>
  
  <p>Can you suggest me a way to add new element to my vector and changing my variable <strong>eq_code</strong>?
  Thanks for your help.</p>