Created
February 10, 2015 00:10
-
-
Save davharris/5e53f97abba66d0c0e83 to your computer and use it in GitHub Desktop.
This file contains 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
f = function(x){ | |
x | |
} | |
f() # Throws error: x is missing | |
g = function(x){ | |
letters[x] | |
} | |
g(1) # Returns the first element of letters | |
g() # Doesn't throw error, returns ALL elements of letters |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hadley has given the answer
ಠ_ಠ