Skip to content

Instantly share code, notes, and snippets.

@TylerPachal
Last active September 4, 2020 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TylerPachal/6960705818fe465a8fee283cd3c93aaa to your computer and use it in GitHub Desktop.
Save TylerPachal/6960705818fe465a8fee283cd3c93aaa to your computer and use it in GitHub Desktop.
# Do not do this in Elixir
flag = true
if foo == bar do
# Anything that happens inside this if block will have no impact
# on the outside of this if block.
flag = false
IO.inspect(flag) # false
end
IO.inspect(flag) # true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment