Static head nodes in the operation on dynamic structures: a useful programming technique

In operations on dynamic data structures (e.g., linked list), manipulating the first node should often be treated specially. Head nodes are used to deal with this problem. Unfortunately, the unused head-nodes are appendices too. They make other trouble in using the structures. In this paper, we use a number of examples to illustrate a technique to handle the problem: using static, temporary head nodes in operations on dynamic data structures. With this technique, definitions of operations on dynamic data structures may become simpler and clearer.