Пример #1
0
 /// <summary>
 /// Match the two states of the Option.
 /// </summary>
 /// <param name="some">Some match operation.</param>
 /// <param name="none">None match operation.</param>
 /// <returns>Unit.</returns>
 public Unit Match(Action <A> some, Action none)
 => OptionOperations.Match(this, some, none);
Пример #2
0
 /// <summary>
 /// Match the two states of the Option and return a non-null Result.
 /// </summary>
 /// <typeparam name="TResult">Result type.</typeparam>
 /// <param name="some">Some match operation.</param>
 /// <param name="none">None match operation.</param>
 /// <returns>Not null Result.</returns>
 public TResult Match <TResult>(Func <A, TResult> some, TResult none)
 => OptionOperations.Match(this, some, none);