6
Come codificare questo diritto in Scala?Passa argomenti a lunghezza variabile a un'altra funzione che prevede lo stesso?
def myFun(strings: String*) = {
// do something...
}
def myWraper(strings: String*) = {
// do something else and then call myFun with the dame input
myFun(strings)
}
Ho provato a mettere un asterisco come
def myWraper(strings: String*) = {
// do something else and then call myFun with the dame input
myFun(strings*)
}
ma questo non sembra funzionare ...
Grazie. Era quello che stavo cercando. Non riuscivo a ricordare come sarebbe stato scritto. Ho provato anche il carattere di sottolineatura, ma è di tutti questi 3 simboli :-) – Ivan