Previous Up Next

5.43.21  Prepend an element at the beginning of a list: prepend

prepend takes as argument a list and an element.
prepend puts this element at the beginning of this list.
Input:

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

Output:

[1,3,4,2]

Input:

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

Output:

[[3,4],1,2]

Previous Up Next