© 1979 by British Computer Society
| ||||||||||||||||||||||||||||||||||||||||||||||||||
On the power of list iteration
Department of Computer Science, Edinburgh University, James Clerk Maxwell Building, The King's Buildings, Mayfield Road, Edinburgh, UK
The list iteration construct lit is defined by:
[equation: see PDF]
Many simple list processing functions can be programmed as expressions built up from the LISP primitives (car, cdr, cons,... etc.) and lit, examples include most of the operations of Boolean algebra and primitive recursive arithmetic (with the integer n represented by a list (NIL...:NIL) of n NIL's). This latter example shows that the equivalence of list iteration programs is undecidable. In the paper the use of lit is illustrated and two theorems are proved which exhibit limitations on its power; these enable one to show that, for example, LISP's equal and flatten (where e.g. flatten [(1 (2 3) 4 ((5) 6))] = (1 2 3 4 5 6)) cannot be computed by list iteration alone.
Received November 1977.
* Department of Computer Science, Edinburgh University, James Clerk Maxwell Building, The King's Buildings, Mayfield Road, Edinburgh EH9 3JZ