Warning! The page was not fully loaded, probably because of a network issue. It could be that not all functionalities work as expected. Please try reloading the page.
Define a function swap_ends that consumes a list of integers and modifies the list so that the first and last elements are swapped, returning the original list. If the list is empty, return the empty list.