At this point we have determined the bindings for the individual variables in the pattern. The null tuple is a tuple with zero elements. Its type, however, is written unit , indicating that it is has but a single element. We'll have more to say about this later in these notes. When tuples get large, it gets hard to remember which position is which.
Records are tuples whose components are labeled with an identifier.
The important thing to note about record expressions is that the order of the fields determines the order of evaluation , but that for record values, the order of the fields is irrelevant. Once the fields have been evaluated, you can write them in any order you like, but the compiler will adhere to the order you choose to write unevaluated fields. Some examples will help clarify the use of record types. In practice one often wishes to select only one or two fields from a tuple or record value, the others being irrelevant to the computation at hand. It would be tedious in the extreme to be forced to bind a variable to each of possibly dozens of irrelevant fields, just so that you could access one of them.