Adding Nodes

addfirst(exlist, exav)

A new empty node is inserted at the front of the list and exav is altered to point to it. This is the only method of adding a node to an empty list.

LP addfirst

For an empty list: a new empty node is inserted at the front of the list and exav is altered to point to it.  This is the only method of adding a node to an empty list.

LP-addfirst-empty

addnext(exlist, exav)

A new empty node is added after the node pointed to by exav and the successor to the node pointed to by exav becomes the successor of the new node.

LP-addnext

With both of these primitives, exav now gives access to the new empty node so that attribute values can be assigned.

Next: Deleting Nodes