elixir-fundamentals
elixir-fundamentals copied to clipboard
Feedback from 2-26
- [ ] Example of the effect of mutating state on an outer closure
outer = -1
IO.puts "BEGIN: outer=#{outer}"
[1, 2, 3]
|> Enum.each fn i ->
IO.puts "BEFORE: i=#{i}, outer=#{outer}"
outer = i
IO.puts "AFTER: i=#{i}, outer=#{outer}"
end
IO.puts "END: outer=#{outer}"
@stefanpenner feel free to dump any feedback here to ensure I can tweak this material