(v)
| 138218 | } |
| 138219 | // This function works analogously to nextLeft. |
| 138220 | function nextRight(v) { |
| 138221 | var children = v.children; |
| 138222 | return children ? children[children.length - 1] : v.t; |
| 138223 | } |
| 138224 | // Shifts the current subtree rooted at w+. This is done by increasing |
| 138225 | // prelim(w+) and mod(w+) by shift. |
| 138226 | function moveSubtree(wm, wp, shift) { |