match<A, B>  function 
 
- B onNone(
- B onSome(- A
 
A pattern matching function for Option that provides branching based on the content of the Option.
This function facilitates pattern matching on an Option<A>, executing one of the provided functions
based on whether the Option is a Some or None. Both onSome and onNone functions have the same
return type in this variation of the match function.
Parameters:
- onNone: A function that gets called if the- Optionis a- None. It returns a value of type- B.
- onSome: A function that gets called if the- Optionis a- Some. It accepts a value of type- Aand returns a value of type- B.
Returns:
- A function that accepts an Option<A>and returns a value of typeB.
Example:
final option = Some(5);
final result = match<int, String>(
  () => "It's None",
  (value) => "Value is: $value"
)(option);
print(result);  // Outputs: Value is: 5
Implementation
B Function(Option<A>) match<A, B>(B Function() onNone, B Function(A) onSome) {
  return matchW<A, B, B>(onNone, onSome);
}