> For the complete documentation index, see [llms.txt](https://demystifyfp.gitbook.io/fstoolkit-errorhandling/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://demystifyfp.gitbook.io/fstoolkit-errorhandling/fstoolkit.errorhandling/task/ce.md).

# Computation Expression

### Task Computation Expression

Namespace: `FsToolkit.ErrorHandling`

### Examples:

#### Example 1

Given a personId and an age, find a person and update their age.

```fsharp
parseInt : string -> int
findPersonById : int -> Task<Person>
updatePerson : Person -> Task<unit>
```

```fsharp
// Task<unit>
let addResult = task {
  let personId = parseInt "3001"
  let age = parseInt "35"
  let! person = findPersonById personId
  let person = { person with Age = age }
  do! updatePerson person
}
```
