prepend
Prepend is an operation that adds an element to the beginning of a sequence, placing it before all existing elements. It is commonly described as the opposite of append. The term derives from Latin prae- meaning before and pendere meaning to hang, reflecting the idea of hanging something before the rest.
In data structures and algorithms, the cost and method of prepending depend on the structure. For linked
In programming languages, prepend is often implemented by a dedicated operator or function. The cons operator
Examples illustrate the concept. Python: l = [2, 3, 4]; l = [1] + l yields [1, 2, 3,