As already mentioned, a facilitator |is optional.
The examples in the other answers do not show this, so itβs worth adding that you can omit it even for a multi-line discriminatory union (and include it when defining a single line union):
type Large =
Case1 of int * string
| Case2 of bool
| SomeOtherCase
| FinalCase of SomeOtherType
type QuickNSmall = | One | Two | Three
I think most people just find these ugly (including me!) And therefore they are usually written as you see in the other answers.
source
share