Import Upstream version 20180207
[hcoop/debian/mlton.git] / doc / guide / src / Variant.adoc
1 Variant
2 =======
3
4 A _variant_ is an arm of a datatype declaration. For example, the
5 datatype
6
7 [source,sml]
8 ----
9 datatype t = A | B of int | C of real
10 ----
11
12 has three variants: `A`, `B`, and `C`.