I am having difficulty in phrasing this question so I apologies for the vague sounding title.
I started learning Scala today. I would like to generate a list of elements, and then multiply that list by a factor N, with the result as follows:
List(1, 2, 3, 4) * N -> List(1, 2, 3, 4, 1, 2, 3, 4) (where N = 2)
In Python, I would just do the following which would yield what I am looking for:
my_list = [1, 2, 3, 4] * 2
However, this does not work in Scala.