z
z copied to clipboard
async/await example
Let's say we have this:
matches(x)(
async (x, xs) => {
const thing = await somethingElse()
...
},
(x) => {
},
)
Will this even...?
Nop, but you can
matches(42)(
(x = 42) => {
return Promise.resolve(44444)
.then(somethingElse)
...
},
(x) => {
}
)
and await outside (eg: from the caller)