Hi folks, I would like to add helper function to the standard library for Promises:
module Promise = {
let xyz = ms => Promise.make((resolve, _) => setTimeout(resolve, ms)->ignore)
}
Usage:
let bar = async () => {
await Promise.xyz(1000)
42
}
What would you call xyz?
Please upvote any previous answer you agree on instead of posting it again.