Node (Node node) { if(node.myAnchor == null) return this; if(PsiTreeUtil.isAncestor(myHead.myAnchor, node.myAnchor, false)) { Node newHead = myHead.prepend(node); return new Cons(newHead, myTail); } return new Cons(node, this); }