Ejemplo n.º 1
0
 private static SingularYield combine(
     SingularYield lhs,
     int rhs,
     combineOperator op
     ) => new SingularYield(
     type: lhs.type,
     value: op.Invoke(lhs.value, rhs)
     );
Ejemplo n.º 2
0
 private static SingularYield combine(
     SingularYield lhs,
     SingularYield rhs,
     combineOperator op
     )
 {
     if (lhs.type != rhs.type)
     {
         throw new InvalidCastException();
     }
     return(new SingularYield(
                type: lhs.type,
                value: op.Invoke(lhs.value, rhs.value)
                ));
 }