Structures

Structures combine other data structures together. They are declared with the data keyword followed by the structure identifier and body. The trailing list separator is recommended but optional.

data Structure:
    field: Type,

If the body is on the same line, it will be terminated by a line break instead of a block close.

data Structure: field: Type

Templates

Structures can have template type parameters. Template identifiers are preceded with the template token.

data Structure<$Type>:
    field: $Type,

Last updated