Discriminated Unions and Union types represent for the first time since the beginning of the chapter constructs not necessarily related to functional programming. They are essential to simplify the development of libraries and applications in F#.
The Record type is a set of simple values that are named and can optionally have members.
Their syntax is as follows:
[ attributes ] type [accessibility-modifier] typename = { [ mutable ] label1 : type1; [ mutable ] label2 : type2; ... } member-list
Take a look at the following example:
//Record Type type Point = { x : float; y: float; z: float option; } let point2D = { x = 1.0; y = 1.0; z = None} let point3D = { point2D with z = Some(-1.0)}