List as Stack of Boxes

Programming Language

imperative / any

Form

Analogy

Attribution — Origin / Source

Collected by Benedict du Boulay — Own practice

Conceptual Advantage

Emphasises that only the head of list (top box) or the whole list (the stack on the pallet) is directly accessible, and that new items can be added on top of a list but not into the middle of it.

Mapping

PLNM
list stack of boxes on a pallet
list element box on the stack
[ top of the stack
] pallet

Draws Attention To

First-in, first-out property of a stack.

Use When

not captured

Cost

not captured

Details

This notional machine was used in the following report:

How to Work the LOGO Machine
du Boulay, J. B. H. & O'Shea, T.

DAI Occasional Paper No.4 (pp. 1-145), 1976

Department of Artificial Intelligence, University of Edinburgh

Chapter 3

The beginning of a list, the top of the stack, is marked with [ and the end of the list, the pallet is marked with ]. These two characters are called list brackets. We call each box of the stack an element of the list.

Comments or Feedback?

Do you have feedback on this notional machine? Did you find a mistake, or do you have a request for improvement? You can create an Issue on GitHub, where the description is hosted. This way we can see your feedback and address it.

For this, you need a GitHub account. Then follow this link to see the source file of this page. In there, click the ... left of the highlighted line, then pick "Reference in a new issue".

Create an Issue on GitHub