next up previous contents
Next: List Construction: Up: How to construct/deconstruct Previous: How to construct/deconstruct

List Destruction:

first, we show how to remove the first element from a list.

 
[XY] = [f,r,e,d]

will result in
 
X=f

---the first element of the list is known as the HEAD of the list.
 
Y=[r,e,d]

---the list formed by deleting the head is the TAIL of the list. This list has been reduced in length and can be further destructed or constructed.



Paul Brna
Mon May 24 20:14:48 BST 1999