You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Writing throws or async in a closure expression explicitly marks a closure as throwing or asynchronous.
{ (parameters) async throws -> return type in
statements
}
If the body of a closure includes a try expression, the closure is understood to be throwing. Likewise, if it includes an await expression, it’s understood to be asynchronous.
The text was updated successfully, but these errors were encountered:
https://docs.swift.org/swift-book/ReferenceManual/Expressions.html#ID393
Writing throws or async in a closure expression explicitly marks a closure as throwing or asynchronous.
{ (parameters) async throws -> return type in
statements
}
If the body of a closure includes a try expression, the closure is understood to be throwing. Likewise, if it includes an await expression, it’s understood to be asynchronous.
The text was updated successfully, but these errors were encountered: