sclass Tree extends Var {
L> children;
*() {}
*(A *v) {}
*(A *v, Iterable> children) { this.children = cloneList(children); }
toString { new LS out; toString(out, 0); ret lines(out); }
// Note: This doesn't call the children() method
void toString(LS out, int indent) {
out.add(spaces(indent) + str(v));
for (Tree t : unnull(children))
t.toString(out, indent+2);
}
A value() { ret get(); }
// if you override, make sure to set field children
L> children() { ret children; }
}