nextprevfirst
Two elements, ptr and ref are used for this task. The only difference is that ptr must be an empty element, whereas ref may have content.