8000 Update pattern-matching.md · HaxeFoundation/code-cookbook@ffa1a64 · GitHub
[go: up one dir, main page]

Skip to content

Commit ffa1a64

Browse files
authored
Update pattern-matching.md
1 parent d34228e commit ffa1a64
< 8000 div class="prc-PageLayout-PaneWrapper-nGO0U Commit-module__Pane--jjRPV Commit-module__TreeExpanded--mn5GU" style="--offset-header:0px;--spacing-row:var(--spacing-none);--spacing-column:var(--spacing-none)" data-is-hidden="false" data-position="start" data-sticky="true">

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

assets/content/cookbook/Beginner/pattern-matching.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ for (value in 0...10) {
7979

8080
### Or pattern
8181

82-
The ```|```
82+
The `|`
8383
operator can be used anywhere within patterns to describe multiple accepted patterns. If there is a captured variable in an or-pattern, it must appear in both its sub-patterns.
8484

8585
Let's go on with the previous example and say that not only 2 and 4 are special, but 6 is too. You can switch on multiple cases like this:

0 commit comments

Comments
 (0)
0