Deleting Nodes

deletefirst(exlist, exav)

LP-deletefirs

The first node is deleted.  Its successor (if any) becomes the new first node and exav is altered to point to it.

If the list only has one node:

LP-deletefirst-one

If the list had only one node it is empty afterwards and exav is invalid.

deletenext(exlist, exav)

LP-deletenextThe successor of the node pointed to by exav is deleted if present. exav remains unchanged.

If exav is already pointing to the last node:

LP-deletenext-lastNext: Create and Destroy