OCaml: Match expression inside another one?
Quick Solution You just need to add parentheses, or begin/end, around the inner match: Simplifications In your particular case there is no need for a nested match. You can just use bigger patterns. You can also eliminate the duplication in the nested rules using “|” (“or”) patterns: You can make it even more readable by replacing … Read more