Record pattern matching
It is possible to pattern match on a record, this allows for the extraction of multiple field values from a record into distinct variables, similar to matching on a tuple or a list.
The let
keyword can only match on single variant custom types, or
when the variant is know, such as after pattern matching with a case
expression.
It is possible to use underscore _
or the spread syntax
..
to discard fields that are not required.