Possible Duplicate:
What is the type of a variable-length argument list in Scala?
I recently came across this post on parameter lists: https://stackoverflow.com/a/4684598/1287554 and I find it really interesting.
I also understand the use case as given below:
def fn(x:Int*) = x.sum //> fn: (x: Int*)Int
fn(1,2,3) //> res0: Int = 6
The obvious explanation I see is that it is some sort of syntactic sugar for the following code:
def fn(x:List[Int]) = x.sum //> fn: (x: List[Int])Int
fn(List(1,2,3)) //> res0: Int = 6
But I can't find any documentation about them. Can someone point me to some links which explains about this type of function parameters? Also, are they called parameter lists or something else? Maybe the reason I can't find anything is because I'm searching with the wrong name?