Summary
Transforms the union into a new type using the given functions for the transformation.
- Namespace
- FunctionalSharp
.DiscriminatedUnions - Containing Type
- DiscriminatedUnion
<Type1, Type2>
Syntax
public ReturnType Match<ReturnType>(Func<Type1, ReturnType> Function1, Func<Type2, ReturnType> Function2)
Type Parameters
Name | Description |
---|---|
ReturnType |
Parameters
Name | Type | Description |
---|---|---|
Function1 | Func |
Function to run for Type1 |
Function2 | Func |
Function to run for Type2 |
Return Value
Type | Description |
---|---|
ReturnType |