Skip to content

Instantly share code, notes, and snippets.

@Torvaney
Last active January 31, 2021 20:53
Show Gist options
  • Save Torvaney/e2c3570e182fb9e84b75d348683c828c to your computer and use it in GitHub Desktop.
Save Torvaney/e2c3570e182fb9e84b75d348683c828c to your computer and use it in GitHub Desktop.
library(tidyverse)
sample_with_suspense <- function(...) {
result <- sample(list(...), 1)
cat_slowly <- slowly(cat, rate = rate_delay(1))
walk(c(rep(".", times = 10), paste0(result, "!\n")), cat_slowly)
}
sample_with_suspense("Pizza", "Burger")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment