Skip to content

Instantly share code, notes, and snippets.

@davharris
Created February 10, 2015 00:10
Show Gist options
  • Save davharris/5e53f97abba66d0c0e83 to your computer and use it in GitHub Desktop.
Save davharris/5e53f97abba66d0c0e83 to your computer and use it in GitHub Desktop.
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
@davharris
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment