-
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
af39f91
commit c6328f6
Showing
1 changed file
with
4 additions
and
4 deletions.
There are no files selected for viewing
8 changes: 4 additions & 4 deletions
8
src/content/chapter3_data_types/lesson04_record_pattern_matching/en.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
<p> | ||
It is possible to pattern match on a record, this allows for the extraction | ||
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. | ||
</p> | ||
<p> | ||
The let key word can only match on single variant custom types. For types with more variants | ||
The <code>let</code> keyword can only match on single variant custom types. For types with more variants | ||
a case expression must be used. | ||
</p> | ||
<p> | ||
It is possible to use underscore <code>_</code> or the spread syntax <code>..</code> to | ||
It is possible to use underscore <code>_</code> or the spread syntax <code>..</code> to | ||
discard fields that are not required. | ||
</p> | ||
</p> |