carpenterTreeContains<T> function
Implementation
bool carpenterTreeContains<T>(CarpenterTreeNode<T> root, Object id) {
if (root.id == id) return true;
return root.children.any((child) => carpenterTreeContains(child, id));
}
bool carpenterTreeContains<T>(CarpenterTreeNode<T> root, Object id) {
if (root.id == id) return true;
return root.children.any((child) => carpenterTreeContains(child, id));
}