Namespace: FsToolkit.ErrorHandling
Apply a function to the values of two options if they are Some. If either option is None, return None.
('TInput1 -> 'TInput2 -> 'TOutput) -> 'TInput1 option -> 'TInput2 option -> 'TOutput optionOption.map2 (fun x y -> x + y) (Some 1) (Some 2)
// Some 3Option.map2 (fun x y -> x + y) (Some 1) None
// NoneOption.map2 (fun x y -> x + y) None (Some 2)
// None