List comprehension with counter in Elixir
<p>Is there a way to add loop counter to the comprehension?</p>

<p>For example, the comprehension without counter: </p>

<pre><code>for c &lt;- ["a", "b"], do: c            # =&gt; ["a", "b"]
</code></pre>

<p>How can I add counter to it? Something like this: </p>

<pre><code>for c &lt;- ["a", "b"], do: {counter, c} # =&gt; [{0, "a"}, {1, "b"}]
</code></pre>