> 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/asyncoption/map.md).

# map

Namespace: `FsToolkit.ErrorHandling`

Apply a function to the value of an async option if it is `Some`. If the option is `None`, return `None`.

## Function Signature

```fsharp
('TInput -> 'TOutput) -> Async<'TInput option> -> Async<'TOutput option>
```

## Examples

### Example 1

```fsharp
AsyncOption.map (fun x -> x + 1) (AsyncOption.some 1)

// async { Some 2 }
```

### Example 2

```fsharp
AsyncOption.map (fun x -> x + 1) (Async.singleton None)

// async { None }
```
