I generally default to a comprehension unless it becomes illegible.
Disclaimer: I am the author of the article and am in the pocket of Big Comprehension
Disclaimer: I am the author of the article and am in the pocket of Big Comprehension
The map approach feels a lot more functional to me and is easy to chain. The `for` method feels a bit awkward. But that said I much prefer Ruby to Python. If I had the opposite preference, I'd probably like the `for` in Elixir more.
for x <- 1..10 do
IO.puts x
end
Isn't that a for loop?https://dev.to/brewinstallbuzzwords/does-elixir-have-for-loo... "Does Elixir have for loops?"
https://elixirforum.com/t/changing-variables-in-a-loop/43526 "Changing variables in a loop"
https://stackoverflow.com/questions/56196664/better-way-writ...
https://stackoverflow.com/questions/48178773/adding-items-to...