zipError

Namespace: FsToolkit.ErrorHandling

Function Signature

Result<'ok, 'leftError> -> Result<'ok, 'rightError> -> Result<'ok, 'leftError * 'rightError>

Examples

Example 1

let result = Result.zip (Ok 1) (Ok 2)
// Ok  1

Example 2

let result = Result.zip (Ok 1) (Error "Bad")
// Ok  1

Example 3

let result = Result.zip (Error "Bad1") (Error "Bad2")
// Error("Bad1", "Bad2")

Last updated