map3
Function Signature
('a -> 'b -> 'c -> 'd) -> Result<'a, 'e> -> Result<'b, 'e>
-> Result<'c, 'e> -> Result<'d, 'e>Examples
Example 1
// int -> int -> int -> int
let add a b c = a + b + c// 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
UserId
Tweet
CreatePostRequest
Last updated