Created
April 4, 2018 07:37
-
-
Save ColinFay/d32cf4c9c5fb8d849f12a4e98d6c0549 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
# Make a function sleep | |
sleepy <- function(fun, sleep){ | |
function(...){ | |
Sys.sleep(sleep) | |
fun(...) | |
} | |
} | |
sleep_print <- sleepy(print, 2) | |
Sys.time() | |
sleep_print("pouet") | |
Sys.time() | |
purrr::walk(1:5, ~ sleep_print(Sys.time())) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment