Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 486 Bytes

File metadata and controls

30 lines (21 loc) · 486 Bytes

ResultOption.map3

Namespace: FsToolkit.ErrorHandling

Function Signature:

('a -> 'b -> 'c -> 'd)
  -> Result<'a option, 'e>
  -> Result<'b option, 'e>
  -> Result<'c option, 'e>
  -> Result<'d option, 'e>

Examples

Example 1

Given the following function:

add : int -> int -> int -> int

Then using ResultOption.map3, we can do the following:

ResultOption.map3 add (Ok (Some 30)) (Ok (Some 10)) (Ok (Some 2)) 
// Ok (Some 42)