How To Do A For Loop In Elixir (using only recursion)

That blog entry is irrelevant :wink: Do you really consider your solution to be simplest?

ForLoop.for_loop(10,&(IO.puts(&1)))
Enum.each(0..10, &(IO.puts(&1)))
for x <- 0..10, do: IO.puts x

Try to look at this code like had no knowledge about programming whatsoever, and answer yourself this: Which line describes what is going to happen when you run it best?

There was some passive aggressive PS. here. And it was uncalled for.

1 Like