So far, we have seen relatively simple data types. LIGO also offers more complex built-in constructs, such as records.
Records are one-way data of different types can be packed into a
single type. A record is made of a set of fields, which are made of
a field name and a field type. Given a record, the value bound to
a field is accessed by giving its name to the selection operator
Let us first consider an example of record type declaration.
And here is how a record value is defined:
Note: A semicolon
;can also separate fields instead of a comma.