Letâs discuss common ways to handle errors in OCaml, their shortcomings, and finally, how polymorphic variants may help. The discussion applies equally well to Reason ML. If you need an introduction to the topic, I recommend Real World OCaml chapter on Error Handling. As a reference point, weâll take three hypothetical functions which can return errors and which we want to compose: Parser.parse, w
{{#tags}}- {{label}}
{{/tags}}