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

# apply

Namespace: `FsToolkit.ErrorHandling`

Function Signature:

```fsharp
Task<('a -> 'b)> -> Task<'a> -> Task<'b>
```

## Examples

Take the following function for example

```fsharp
// string -> int
let characterCount (s: string) = s.Length
```

### Example 1

```fsharp
let result =
    Task.singleton "foo" // Task<string>
    |> Task.apply (Task.singleton characterCount) // Task<int>

// task { 3 }
```
