Represents a case in a switch-like structure where a specific value is matched and returns a result of type R when the operation is executed.
R
The type of the value to be checked.
The type of the return value from the operation.
The function to execute when this case is matched, returning a value of type R.
The value to be checked against.
Represents a case in a switch-like structure where a specific value is matched and returns a result of type
Rwhen the operation is executed.