Active pattern is a technique in F# programming language which enable you to define named partitions that subdivide input data, so that you can use these names in a pattern matching expression just as you would for a discriminated union.
Active pattern is a technique in F# programming language which enable you to define named partitions that subdivide input data, so that you can use these names in a pattern matching expression just as you would for a discriminated union.
You can use active patterns to decompose data in a customized manner for each partition. For example, its possible wrap objects with an active pattern, so that you can use objects in pattern matching as easily as any other union type.