You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Overall I thought there was good advice in the advice, but I noticed a couple of errors in the code example using the result type with the let* bind operator. The example passes a Yaml.value entity to Result.map_error instead of a (Yaml.value, [`Msg of string]) result entity ; and the function passed to Result.map_error is of type string -> string by partial application of Printf.sprintf instead of type [`Msg of string] -> ....
The second issue also appears in the equivalent example code which uses the binary >>= operator, but not the first issue.
The text was updated successfully, but these errors were encountered:
I have been reading the guide on error handling at Error Handling · OCaml Documentation.
Overall I thought there was good advice in the advice, but I noticed a couple of errors in the code example using the
result
type with thelet*
bind operator. The example passes aYaml.value
entity toResult.map_error
instead of a(Yaml.value, [`Msg of string]) result
entity ; and the function passed toResult.map_error
is of typestring -> string
by partial application ofPrintf.sprintf
instead of type[`Msg of string] -> ...
.The second issue also appears in the equivalent example code which uses the binary
>>=
operator, but not the first issue.The text was updated successfully, but these errors were encountered: