The sketch of what I am trying to do is below
def printcsv(args: String*) {
val line = for (arg <- args) {???}
println(line)
}
I would like
printcsv(“Hello”, “to”, “world”)
To print
“Hello”,”to”,”world”
I could do this was a lot of imperative contortion however I’m struggling with an elegant solution. It’s important to store in val and not simply print directly to the console.
Is that what you’re looking for?
If you need quotes in result, you can do something like this before
mkString: