Skip to content

Commit d45b74c

Browse files
authored
Merge pull request #12628 from dotnet/cartermp-patch-2
Update active pattern syntax representation
2 parents c5cb968 + fc25a3a commit d45b74c

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

docs/fsharp/language-reference/active-patterns.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,16 @@ ms.date: 05/16/2016
1010
## Syntax
1111

1212
```fsharp
13-
// Complete active pattern definition.
14-
let (|identifer1|identifier2|...|) [ arguments ] = expression
13+
// Active pattern of one choice.
14+
let (|identifier|) [arguments] valueToMatch= expression
15+
16+
// Active Pattern with multiple choices.
17+
// Uses a FSharp.Core.Choice<_,...,_> based on the number of case names. In F#, the limitation n <= 7 applies.
18+
let (|identifer1|identifier2|...|) valueToMatch = expression
19+
1520
// Partial active pattern definition.
16-
let (|identifier|_|) [ arguments ] = expression
21+
// Uses a FSharp.Core.option<_> to represent if the type is satisfied at the call site.
22+
let (|identifier|_|) [arguments ] valueToMatch = expression
1723
```
1824

1925
## Remarks

0 commit comments

Comments
 (0)