2 // This demonstrates how logical patterns can be used with mulitiple
3 // objects. This fixes a bug in releases 1.x of Prop.
7 datatype color = red | green | blue | yellow | black | white;
9 void print_color(color c, color d)
12 case (white, black) || (black, white): cout << "black and white\n";
13 case red || green || blue, blue || black: cout << "good\n";
14 case _: cout << "bad\n";
20 cout << "black & white = "; print_color(black, white);
21 cout << "black & white = "; print_color(white, black);
22 cout << "good = "; print_color(red, black);
23 cout << "good = "; print_color(red, blue);
24 cout << "good = "; print_color(blue, blue);
25 cout << "bad = "; print_color(white, white);
26 cout << "bad = "; print_color(green, yellow);