Snippets tagged active pattern
Using Active patterns
Show's how to create a parametrized active pattern that will match based on a regular expression.
15 people like this
Posted: 1 years ago by Robert PickeringActive pattern for let binding inside patterns
The Let active pattern demonstrated by this snippet can be used to assign values to symbols in pattern matching. This is useful for writing complex pattern matching using match as we can handle multiple cases using a single clause.
49 people like this
Posted: 1 years ago by Tomas PetricekRegular expression active pattern
Active pattern returning list of captured groups.
7 people like this
Posted: 1 years ago by Daniel RobinsonUsing Active patterns
Shows how to use an active pattern that will try to determine the format of an input value.
10 people like this
Posted: 1 years ago by Robert Pickering
Use of Partial-Case with Parameters
Depicts use of one kind of active pattern matching; partial-case with parameters.
5 people like this
Posted: 1 years ago by Joel HuangActive pattern for comparison
An active pattern for comparing two objects of the same type and implementing IComparable. Modeled on Standard ML comparison.
4 people like this
Posted: 11 months ago by petebuActive pattern to extract HttpStatusCode from WebException
A simple active pattern that allows you to match WebExceptions by HttpStatusCode. I find it useful for quick scripts where I only need WebClient and don't have to get involved with WebRequest etc.
5 people like this
Posted: 5 months ago by Leaf Garland