Often contracts require complex data structures, which in turn require well-typed storage or functions to work with. LIGO offers a simple way to compose simple types into structured types.
The first of those structured types is the record, which aggregates types as fields and indexes them with a field name. In the example below you can see the definition of data types for a ledger that keeps the balance and number of previous transactions for a given account.
Complementary to records are the variant types, which are described in the section on pattern matching. Records are a product of types, while variant types are sums of types.