Is adding multiple elements in a list comprehension possible?
<p>I'm wondering whether it's possible to add multiple elements to a list within a list comprehension.</p>

<p>For instance, if I want a list consisting of the numbers 1 to 10, I can write:</p>

<pre><code>[k | k &lt;- [1..10]]
</code></pre>

<p>However, is there also a way to do this by always adding <code>k</code> <em>and</em> <code>k+1</code> in the same step, and just take only the odd numbers <code>k</code>? Following code is invalid but perhaps explains better what I'm trying to do:</p>

<pre><code>[k, k+1 | k &lt;- [1, 3..10]]
</code></pre>

<p>Currently, the closest thing to this (that I am aware of) is the following:</p>

<pre><code>foldl1 (++) [[k, k + 1] | k &lt;- [1, 3..10]]
</code></pre>