Skip to content

Commit 6ed67fe

Browse files
shethaaditAdit ShethT-Gro
authored
Clarify Introduction of Wildcard Pattern in F# Pattern Matching Documentation (#44154)
* Fix bug 37053. * Update docs/fsharp/tour.md Co-authored-by: Tomas Grosup <[email protected]> --------- Co-authored-by: Adit Sheth <[email protected]> Co-authored-by: Tomas Grosup <[email protected]>
1 parent d1ac1f6 commit 6ed67fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/fsharp/tour.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Because DUs allow you to represent the recursive structure of the tree in the da
120120

121121
[!code-fsharp[PatternMatching](~/samples/snippets/fsharp/tour.fs#L717-L743)]
122122

123-
Something you may have noticed is the use of the `_` pattern. This is known as the [Wildcard Pattern](language-reference/pattern-matching.md#wildcard-pattern), which is a way of saying "I don't care what something is". Although convenient, you can accidentally bypass Exhaustive Pattern Matching and no longer benefit from compile-time enforcements if you aren't careful in using `_`. It is best used when you don't care about certain pieces of a decomposed type when pattern matching, or the final clause when you have enumerated all meaningful cases in a pattern matching expression.
123+
The following sample introduces the `_` pattern, which you might have noticed before. This is known as the [Wildcard Pattern](language-reference/pattern-matching.md#wildcard-pattern), which is a way of saying "I don't care what something is". Although convenient, you can accidentally bypass Exhaustive Pattern Matching and no longer benefit from compile-time enforcements if you aren't careful in using `_`. It is best used when you don't care about certain pieces of a decomposed type when pattern matching, or the final clause when you have enumerated all meaningful cases in a pattern matching expression.
124124

125125
In the following example, the `_` case is used when a parse operation fails.
126126

0 commit comments

Comments
 (0)