Skip to content

List (computing)

A finite ordered collection whose positions remain distinct even when values repeat, exposed through sequence operations independently of its concrete array or linked representation.

Core Idea

A computing list is a finite ordered collection that preserves duplicate occurrences and exposes sequence operations independently of storage. Arrays, linked nodes, and other structures can implement the same list contract while giving indexing, insertion, traversal, and persistence different costs. The abstract data type is not identical to a linked list. The abstract data type is not identical to a linked list.

How would you explain it like I'm…

Toys in a Row

A list is like a line of toys on a shelf: there's a first one, a next one, and so on, in order. If you have two of the same toy, both still count. You can add toys, look at them one by one, or pick a certain one.

Ordered Item Lists

In computing, a list is an ordered collection of items. Each item has a place in the order, and if the same value appears twice, both copies count as separate items. You can make a list, go through it item by item, pick out certain items, or change them. A list is an idea about what you can do, not one particular way of storing it — a computer might keep it as a row of boxes side by side, or as a chain where each item points to the next. Different storage ways make some actions faster and others slower, but the list behaves the same.

List as an Abstract Data Type

In computing, a list is an abstract data type representing a finite sequence: items have a specific order, and repeated values are kept as separate occurrences. Its operations include building lists, going through them, selecting items, and transforming them. In many functional languages, a list is defined inductively: it's either empty, or an item joined (with 'cons') onto another list. The list idea isn't the same as a linked list — arrays, dynamic arrays, linked nodes, and trees can all implement it with different speeds for different operations. Operations show different sides of a list: head and tail show its recursive structure, indexing uses positions, append joins lists, map changes each item but keeps the shape, filter keeps only some items in order, and fold combines them into one result.

 

A list, as an abstract data type, is a finite sequence: items occupy definite positions, repeated values remain distinct occurrences, and the interface supports construction, traversal, selection, and transformation. In many functional settings it is defined inductively from the empty list and a constructor such as cons. The ADT is distinct from the linked list: arrays, dynamic arrays, linked nodes, balanced trees, and compressed layouts can all implement ordered-sequence behavior with different costs. The abstraction barrier lets clients reason about order and operations while implementations choose storage and performance tradeoffs. Operations expose different aspects of the contract: head and tail expose recursive structure; indexing exposes position; append concatenates; map preserves shape while transforming values; filter changes membership but preserves relative order; fold summarizes a traversal. The extensional results of these operations agree across representations, but their costs depend on the representation.

Scope of Application

The abstraction applies wherever software needs a finite ordered, multiplicity-preserving collection behind a declared sequence interface. Use it for finite ordered collections whose interface preserves position and multiplicity; specify representation and complexity separately.

  • Functional programming. Uses nil-and-cons recursion and folds.
  • Collections libraries. Exposes sequence operations behind implementations.
  • Parsing. Stores ordered tokens, nodes, or alternatives.
  • Application data. Maintains user-visible ordering and duplicates.
  • Algorithm analysis. Compares operation costs across representations.

Clarity

The list abstraction separates extensional sequence behavior from storage layout. It prevents ‘list’ in an API from silently implying linked nodes, constant-time indexing, uniqueness, sortedness, or infinite laziness—properties that must be specified separately. The closest near miss sets the boundary: An array is the closest near miss: it can implement a list and often offers list operations, but its contiguous indexed representation and random-access contract are implementation properties rather than the abstract list identity.

Manages Complexity

Collections differ along order, multiplicity, finiteness, access, update, and representation. Naming the list contract fixes the first three and exposes the remaining choices, allowing correctness arguments to remain stable while performance analysis follows the concrete implementation. The central abstract contract–representation cost tradeoff is this: One list interface supports several layouts whose operation complexities differ sharply. A second positional access–structural recursion tension matters because Index-oriented and head-tail views favor different algorithms and implementations.

Abstract Reasoning

Use three linked moves: check finiteness, order preservation, and duplicate-occurrence identity first; state the constructor and observer operations promised by the interface; reason extensionally about sequence results before choosing a representation. As a collapse test, the case exits when order or multiplicity is discarded, the collection becomes potentially infinite without a finite-list boundary, or clients must depend on a non-list representation contract. A fourth check is to analyze time, space, persistence, and locality against the selected implementation.

Knowledge Transfer

List laws transfer literally across programming languages and representations when finite order and occurrence multiplicity are preserved. Performance expectations do not: append, indexing, and insertion can change complexity between arrays and linked implementations. Outside computing, an everyday written list is analogous unless it instantiates the formal sequence operations. No canonical parent prime is currently asserted; broader structural comparisons remain related-prime analogies until separately adjudicated in the DAG. A list is a finite, operation-bearing realization of ordered sequence structure. Clients depend on list behavior rather than linked or contiguous storage details.

Relationships to Other Abstractions

Local relationship map for List (computing)Parents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.List (computing)DOMAINPrime abstraction: Data Structure — is a kind ofData StructurePRIMEDomain-specific abstraction: Self-Organizing List — is a kind ofSelf-OrganizingListDOMAIN

Current abstraction List (computing) Domain-specific

Parents (1) — outgoing typed relations

  • List (computing) is a kind of Data Structure Prime

    List (computing) is a strict kind of Data Structure: its frozen identity entails the parent's defining structure while adding domain-specific restrictions.

Children (1) — abstractions linked here by typed relations

  • Self-Organizing List Domain-specific is a kind of List (computing)

    An access-updated sequential list is a restricted kind of finite ordered computing list.

Hierarchy path (1) — routes to 1 parentless root

Neighborhood in Abstraction Space

List (computing) sits in a crowded region of the domain-specific corpus (31st percentile for distinctiveness): several abstractions share nearly its structure, so a description that fits it tends to fit its neighbors too.

Family — Abstract Algebra & Category Theory (26 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-11-14