Logo

Programming-Idioms

History of Idiom 2 > diff from v51 to v52

Edit summary for version 52 by programming-idioms.org:
[Elixir] +DemoURL

Version 51

2016-09-27, 14:42:28

Version 52

2016-11-30, 20:17:50

Idiom #2 Print Hello 10 times

Loop to execute some code a constant number of times

Illustration

Idiom #2 Print Hello 10 times

Loop to execute some code a constant number of times

Illustration
Code
for _ <- 1..10 do IO.puts "hello" end
Code
for _ <- 1..10 do IO.puts "hello" end
Doc URL
http://elixir-lang.org/docs/stable/elixir/Kernel.SpecialForms.html#for/1
Doc URL
http://elixir-lang.org/docs/stable/elixir/Kernel.SpecialForms.html#for/1
Demo URL
http://play.elixirbyexample.com/s/44301cf4c3