-
Notifications
You must be signed in to change notification settings - Fork 22
Various Patterns
digikar edited this page Dec 26, 2019
·
6 revisions
Trivia maintains a full compatibility with Optima. If you are already familier with Optima, there is no need to understand anything new, other than the additional patterns introduced in Trivia.
As the baseline, this page describe the syntax of macro match
and its variants.
In the following sections, I briefly summarize what kind of patterns are available in these matcher macros.
- Type-Based Destructuring Patterns (In addition to the Optima’s pattern, Trivia has soft-match variants and specialized variants of vector patterns)
- Logic Based Patterns
-
Special Patterns (
place
pattern,bind
pattern andaccess
pattern)
For a quickstart, go to the Basics section. Below is for the people already familiar with Optima.