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

# singleton

### CancellableTaskResult.singleton

Namespace: `FsToolkit.ErrorHandling`

Lifts a value into a `CancellableTaskResult`, wrapping it as an `Ok` result.

### Function Signature:

```fsharp
'item -> CancellableTaskResult<'item, 'Error>
```

### Examples

#### Example 1

```fsharp
let result : CancellableTaskResult<int, string> =
  CancellableTaskResult.singleton 42
```

#### Example 2

Using `singleton` inside a pipeline to return a successful value:

```fsharp
let getDefaultConfig () : CancellableTaskResult<Config, string> =
  CancellableTaskResult.singleton defaultConfig
```
