Beispiel #1
0
 /// <summary>
 /// Subtract the Some(x) of one option from the Some(y) of another.  If either of the
 /// options are None then the result is None
 /// For numeric values the behaviour is to find the difference between the Somes (lhs - rhs)
 /// For Lst values the behaviour is to remove items in the rhs from the lhs
 /// For Map or Set values the behaviour is to remove items in the rhs from the lhs
 /// Otherwise if the R type derives from ISubtractable then the behaviour
 /// is to call lhs.Subtract(rhs);
 /// </summary>
 /// <param name="lhs">Left-hand side of the operation</param>
 /// <param name="rhs">Right-hand side of the operation</param>
 /// <returns>lhs - rhs</returns>
 public static Option <T> subtract <T>(Option <T> lhs, Option <T> rhs) =>
 lhs.Subtract(rhs);
Beispiel #2
0
 public static Option <T> subtract <NUM, T>(Option <T> lhs, Option <T> rhs) where NUM : struct, Num <T> =>
 lhs.Subtract <NUM, T>(rhs);