Created
September 4, 2020 16:13
-
-
Save TylerPachal/581e826754d7efac5bf041e5fe88a4f6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Do not do this in Elixir | |
def increment(number) do | |
# Because of lexical scoping, this will have no impact to anything | |
# outside the scope of this function. | |
number = number + 1 | |
end | |
count = 0 | |
increment(count) | |
IO.inspect(count) # 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment