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

# map

Namespace: `FsToolkit.ErrorHandling`

Apply a function to the value of a value task voption if it is `ValueSome`. If the voption is `ValueNone`, return `ValueNone`.

## Function Signature

```fsharp
('input -> 'output) -> ValueTask<'input voption> -> ValueTask<'output voption>
```

## Examples

### Example 1

```fsharp
ValueTaskValueOption.map (fun x -> x + 1) (ValueTaskValueOption.valueSome 1)

// valueTask { ValueSome 2 }
```

### Example 2

```fsharp
ValueTaskValueOption.map (fun x -> x + 1) (ValueTask<_>(ValueNone))

// valueTask { ValueNone }
```
