Definition · applies to lists

Elementary

To prepend something to a list is to add it at the beginning.

Undergraduate (collections and data structures)

To prepend $x$ to a list $(a_1, \dots, a_n)$ is to form the list $(x, a_1, \dots, a_n)$, with $x$ added at the beginning.

Notes

Compare append, which adds an element at the end.

All definitions · All distinctions · All examples