2 #include <AD/strings/string.h>
5 // A simple datatype to test the `class' keyword in datatype declaration.
6 // The keyword is necessary since the constructor for node() must
9 // Tree node (Tree, const String&, Tree);
13 // Tree node (Tree, String, Tree);
17 | node (Tree, class String, Tree)
20 ostream& operator << (ostream& out, Tree t)
22 case empty: return out << "X";
23 case leaf(i): return out << '[' << i << ']';
24 case node(a,s,b): return out << s << '(' << a << ',' << b << ')';
30 Tree t = node(leaf(1), "Weasel", node(leaf(2), "Skunk", empty));