map2
Function Signature
('a -> 'b -> 'c) -> Result<'a, 'd> -> Result<'b, 'd>
-> Result<'c, 'd>Examples
Example 1
// int -> int -> int
let add a b = a + b// string -> Result<int, string>
let tryParseInt (str: string) =
match System.Int32.TryParse str with
| true, x -> Ok x
| false, _ ->
Error (sprintf "unable to parse '%s' to integer" str)Example 2
Latitude
Longitude
Location
Last updated