zip

Namespace: FsToolkit.ErrorHandling

Function Signature

AsyncValidation<'leftOk, 'error> -> AsyncValidation<'rightOk, 'error> -> AsyncValidation<'leftOk * 'rightOk, 'error>

Examples

Example 1

let result = AsyncValidation.zip (AsyncValidation.ok 1) (AsyncValidation.ok 2)
// async { Ok (1, 2) }

Example 2

let result = AsyncValidation.zip (AsyncValidation.ok 1) (AsyncValidation.error "Bad")
// async { Error [ "Bad" ] }

Example 3

let result = AsyncValidation.zip (AsyncValidation.error "Bad1") (AsyncValidation.error "Bad2")
// async { Error [ "Bad1"; "Bad2" ] }

Last updated