Closed gregtatcam closed 11 years ago
This comment references this from milestone beta1: https://realworldocaml.org/beta1/en/html/lists-and-patterns.html#idp7782352
Context:
One feature of OCaml's pattern language that we've encountered
here for the first time is or-patterns,
which allow you to have multiple sub-patterns within a larger
pattern. In this case,
None | Some ("",_)
is an
or-pattern. As we'll see later, or-patterns can be nested
anywhere within larger patterns.
Removed the claim of novelty.
or-pattern was first used/explained in Variables and Functions:Recursive functions.