if (FALSE) {
library(promises)
# Single async query
goose_async("Explain async programming") %...>%
{ cat("Response:", .) }
# Chain multiple async operations
goose_async("Write a function") %...>%
{ goose_async(paste("Optimize this:", .)) } %...>%
{ cat("Optimized:", .) }
}
Run the code above in your browser using DataLab