# Waits x seconds, then returns x*10
wait_this_long <- function(x) {
promise(~later::later(~{
resolve(x*10)
}, delay = x))
}
promise_map(list(A=1, B=2, C=3), wait_this_long) %...>%
print()
Run the code above in your browser using DataLab