Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 451 Bytes

File metadata and controls

19 lines (13 loc) · 451 Bytes

AsyncResultOption Computation Expression

Namespace: FsToolkit.ErrorHandling

Examples

Example 1

The AsyncResultOption.map2 example can be written using the asyncResultOption computation expression as below:

// Async<Result<UserTweet option, exn>>
asyncResultOption {
  let! post = getPostById samplePostId
  let! user = getUserById post.UserId
  return userTweet post user
}