Append :_*
to the parameter in test
like this
test(some:_*)
And it should work as you expect.
If you wonder what that magical :_*
does, please refer to this question.
More Related Contents:
- Creating a specific pattern with two-dimensional array in scala
- Printing array in Scala
- How to create and use a multi-dimensional array in Scala?
- Why are Arrays invariant, but Lists covariant?
- Why does `Array(0,1,2) == Array(0,1,2)` not return the expected result?
- Access Array column in Spark
- Appending an element to the end of a list in Scala
- How to forward functions with variadic parameters?
- How to convert an Array to a Tuple?
- New Array Mips Full Code [closed]
- How to solve while loop in array?
- Creating an array from a text file in Bash
- What does the range method getValues() return and setValues() accept?
- Can PostgreSQL index array columns?
- How to check if an element is in an array
- How to sort an array of custom objects by property value in Swift
- Change values while iterating
- How do I slice an array in Excel VBA?
- How do I insert an element at the correct position into a sorted array in Swift?
- How to pass allocatable arrays to subroutines in Fortran
- Declare and Initialize String Array in VBA
- How to remove an element from an array in Swift
- Element-wise array replication according to a count [duplicate]
- Is it possible to make an Array extension in Swift that is restricted to one class?
- How to allocate arrays on the heap in Rust 1.0?
- Excel VBA: Range to String Array in 1 step
- How can a scalar be passed to a vector (1D array) to a Fortran subroutine?
- Setting arrays in Firebase using Firebase console
- PHP Spread Syntax in Array Declaration
- How does Array#sort work when a block is passed?