# NOT RUN {
library(promises)
value <- runif(1)
pr <- promise_resolve(value)
# works with `magrittr` pipe
pr %>%
wait(1) %>%
then(~ cat(., "\n"))
# works with `promises` pipe
pr %...>%
wait(1) %...>%
{ cat(., "\n") }
# also works with any object
value %>%
wait(1) %>%
then(~cat(., "\n"))
# }
Run the code above in your browser using DataLab