const appendElement = (item) => {
return (list) => {
};
};
Add a new item to the end of the list.
Parameters item (any): The item to add.
Output (Array) => Array: Generates a closure that duplicates the original list with the added item at the end.