Skip to content

Instantly share code, notes, and snippets.

/**
Example function which takes varargs
*/
def myfunc(name: String, others: String*) { // note the star after String
println(s"$name")
others.foreach(str => println(s" varag=$str") )
println(" ---")
}