How to make list of integers with a start, length and increment in Elixir?
<p>I would like to generate a list of integers.  I have the starting value, the increment value and the length of the list.</p>

<p>I know this should be simple, but I can't crack it.  I have tried list comprehensions, Stream functions, etc.</p>

<p>Here is what I've tried and what didn't work:</p>

<p>A range allows me to choose the start and end, but not the increment</p>

<pre><code>1..3 |&gt; Enum.to_list()
</code></pre>

<p>This list comprehension works, but is it the "best" way?</p>

<pre><code>start = 1
length = 3
increment = 2
for i &lt;- 0..length-1, do: start + i*increment
</code></pre>