The two FUNCTIONs RemHead& and RemTail& are used in combination with
the SUBs AddHead and AddTail to create special list ordering.  When
you combine AddTail and RemHead&, you produce a first-in-first-out
(FIFO or pipe) list.  When you combine AddHead and RemHead& a
last-in-first-out (LIFO or stack) list is produced.  RemTail& exists
for symmetry.  Other combinations of these functions can also be used
productively.

Both RemHead& and RemTail& remove a node from the list&, and return a
pointer to the removed node&. If the list is empty, the FUNCTIONs will
return a zero result.  For example, "node& = RemHead&(list&)".

                                                     Back to List Functions