('errorInput -> 'errorOutput) -> Result<'ok option, 'errorInput> -> Result<'ok option, 'errorOutput>
// string -> int
let getErrorCode (message: string) =
match message with
| "bad things happened" -> 1
| _ -> 0
let result : Result<string option, int> =
Error "bad things happened" // Result<string option, string>
|> ResultOption.mapError getErrorCode // Result<string option, int>
// Error 1