# Computation Expression

### AsyncResultOption Computation Expression

Namespace: `FsToolkit.ErrorHandling`

### Examples

#### Example 1

The [AsyncResultOption.map2 example](https://demystifyfp.gitbook.io/fstoolkit-errorhandling/fstoolkit.errorhandling/map2#example-1) can be written using the `asyncResultOption` computation expression as below:

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