} else if (compare(root.key, right) >= 0) {
        // If the root lies to the right of the interval, we can discard the
        // entire right subtree.
        if (root.left !== null) {
            assert(root.left instanceof Node);