예제 #1
0
        public static RefinementSetCases Conjunction(RefinementSetCases left, RefinementSetCases right) =>
        new RefinementSetCases(
            RefinementSet.Join(
                left.Positive,
                right.Positive,
                outer: (refinement) => refinement.ToMaybe(),
                inner: (reference, leftType, rightType) => Refinement.Conjunction(reference, leftType, rightType)
                ),

            RefinementSet.Join(
                left.Positive,
                right.Positive,
                outer: (refinement) => Maybe.None <Refinement>(),    // symbols in either left or right but not both LOSE their refinement due to the indecision
                inner: (reference, leftType, rightType) => Refinement.NegationOfConjunction(reference, leftType, rightType)
                )
            );
예제 #2
0
 public RefinementSetCases(RefinementSet positive, RefinementSet negative)
 {
     _positive = positive;
     _negative = negative;
 }