imperative / any
Analogy
Collected by Benedict du Boulay — Own practice
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.
PL | NM |
---|---|
list | stack of boxes on a pallet |
list element | box on the stack |
[ | top of the stack |
] | pallet |
First-in, first-out property of a stack.
This notional machine was used in the following report:
DAI Occasional Paper No.4 (pp. 1-145), 1976
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.
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".