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

# map

Namespace: `FsToolkit.ErrorHandling`

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

## Function Signature

```fsharp
('input -> 'output) -> CancellableValueTask<'input option> -> CancellableValueTask<'output option>
```

## Examples

### Example 1

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

// cancellableValueTask { Some 2 }
```

### Example 2

```fsharp
CancellableValueTaskOption.map (fun x -> x + 1) (CancellableValueTask.singleton None)

// cancellableValueTask { None }
```
