let a: Promise<Int> = ... let b: Promise<() throws -> Int> = a.map { try foo($0) }
map
throw
() throws -> Foo
async
await