Loops/For with a specified step: Difference between revisions

no edit summary
imported>Brie
(Add Nu)
No edit summary
Line 1,258:
<syntaxhighlight lang="elixir">iex(1)> Stream.iterate(1, &(&1+2)) |> Enum.take(10)
[1, 3, 5, 7, 9, 11, 13, 15, 17, 19]</syntaxhighlight>
 
=={{header|EMal}}==
<syntaxhighlight lang="emal">
for int i = 2; i <= 8; i+= 2 do write(i + ", ") end
writeLine("who do we appreciate?")
</syntaxhighlight>
{{out}}
<pre>
2, 4, 6, 8, who do we appreciate?
</pre>
 
=={{header|Erlang}}==
226

edits