Skip to content

Instantly share code, notes, and snippets.

@peterdalle
Created October 16, 2019 18:34
Show Gist options
  • Save peterdalle/5a09438bf13cb0a30aa902eee1fd9279 to your computer and use it in GitHub Desktop.
Save peterdalle/5a09438bf13cb0a30aa902eee1fd9279 to your computer and use it in GitHub Desktop.
Offensive calculator programming
`+` <- function(x, y) {
val <- sum(x, y)
if (val > 1000000000) {
paste0("Don't push it")
} else if (val > 100000) {
paste0("So you like big numbers, huh? Well, I give you a big number. How about ", val ,"? Is that good enough for you?")
} else {
paste0("That's a fucking ", val)
}
}
# Try it out:
# > 1 + 1
# > 842 + 3948
# > 815913823442 + 3948430984435
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment