aboutsummaryrefslogtreecommitdiff
path: root/lessons/src/lesson032_records/text.html
blob: f515ccda7c5089ccc08d7a2b6b84c608132e6f17 (plain)
1
2
3
4
5
6
7
8
9
10
<p>Variants of a record can hold other data within them.</p>
<p>
  These fields can be given labels, and like function argument labels they can
  be optionally used when calling the record constructor. Typically labels will
  be used for variants that define them.
</p>
<p>
  It is common to have a custom type with one variant that holds data, this is
  the Gleam equivalent of a struct or object in other languages.
</p>