!7 p-exp { ObjectNode root = new(mL("English sentence patterns")); //processNode_recursive(root, 10); ct_process_firstOnly(root, 10, 'ct_objectNodeToListNode); showFrame(jDynamicTree(root, ct_getChildren())); } svoid ct_process_firstOnly(CTNode n, int depthCounter, S... functions) { if (n == null || depthCounter <= 0) ret; if (nempty(n.children)) ret; for (S f : functions) { if (nempty(n.children)) ret; pcallF(f, n); } ct_process_firstOnly(first(n.children), depthCounter-1, functions); } svoid ct_objectNodeToListNode(CTNode n) { if (n instanceof ObjectNode) { ObjectNode on = cast n; O o = on.obj; if (o instanceof Collection) n.add(ListNode(asList((Collection) o))); } } sclass ListNode > CTNode { L list; *() {} *(L *list) {} S toString2() { ret sfu(list); } public bool equals(O o) { ret stdEq(this, o, 'list); } public int hashCode() { ret stdHash(this, 'list); } }