> 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/option/lists/sequencevoptionm.md).

# sequenceVOptionM

Namespace: `FsToolkit.ErrorHandling`

Applies the monadic function `id` to each element in the input list, and returns the result as an option. If any element in the list is ValueNone, the entire result will be ValueNone.

## Function Signature

```fsharp
'a voption list -> 'a list voption
```

## Examples

### Example 1

```fsharp
let myList =
    [
        ValueSome 123
        ValueSome 456
        ValueSome 789
    ]

List.sequenceVOptionM myList
// ValueSome [123; 456; 789]
```

### Example 2

```fsharp
let myList =
    [
        ValueSome 123
        ValueNone
        ValueSome 789
    ]

List.sequenceVOptionM myList
// ValueNone
```
