### 6.3.11 Prepending an element at the beginning of a list

The prepend command adds an element to the beginning of a list.

- prepend takes two arguments:
  - x, an object.
  - L, a list.
- prepend(x,L) returns a list containing x as the first element followed by the elements of L.

#### Examples

prepend([3,4,2],1)

| ⎡ ⎣ | 1,3,4,2 | ⎤ ⎦

prepend([1,2],[3,4])

| ⎡ ⎣ | ⎡ ⎣ | 3,4 | ⎤ ⎦ | ,1,2 | ⎤ ⎦