title: Clojure loop with count
body: <p>I am fairly new to Clojure and would help help with some code. I have a function which takes a vector and i would like to loop through the vector and get the value at an index 'i' and the value of 'i' itself. 'i' is the value which is incremented in the loop.</p>
  
  <p>I have checked 'for' at the clojure docs at <a href="https://clojuredocs.org/clojure.core/for" rel="nofollow noreferrer">for</a> and wrote the following code.</p>
  
  <pre><code>(for [i some-vector]
        (print (get-intersec i (.length some-vector) loop-count)))
  </code></pre>
  
  <p>The loop-count variable is supposed to be the loop count.</p>
  
  <p>I have also checked <a href="https://clojuredocs.org/clojure.core/loop" rel="nofollow noreferrer">loop</a> but it does not seem like a feasible solution. Can someone help me with a clojure function i can use or help me write a macro or function that can do that.</p>
  
  <p>Thank you.</p>
  
  <p>Ps: To solve my problem, i use my own counter but would like a better solution.</p>