I'm new to scala and just playing around with it in my free time and ran into this problem:
if I have this list:
val list = List(1,2,3,4)
and then say:
val newList = list :: 5
scala tells me
error: value :: is not a member of Int
but if I say:
val newList = list ::: List(5)
scala is completely alright with it. Why can I not append an element to a List, but I can append all elements of a List to the end of a List