 <p>I can't speak to the first question directly, but assuming that @korefn and @om-nom-nom are correct; that the block is a closure and is interpreting the return as a void.</p> <p>In response to your update, I would try:</p> <pre><code>@for(i &lt;- 1 to 10) { &lt;option value="@i"&gt;@i&lt;/option&gt; } </code></pre> <p>which is how I've used it in the past. I've also found it helpful to use a nested @if block to handle the selected option differently so that it is selected on loading the document.</p>