Appending an element to the end of a list in Scala Appending an element to the end of a list in Scala arrays arrays