λ

1.10: Defining data types

Type aliases may be defined using the type keyword.

New data types may be declared using the datatype keyword.

major_arcana_card declares a type, major_arcana_card, which is a pair of a name and number.

Data types may consist of multiple, exclusive cases. card_suit declares one type with four values, and card_value declares one type with fourteen values.

(* examples/new-data-types.sml *)