blob: b9563a1b77babc95577533d66f1d52e886969f0e (
plain) (
tree)
|
|
object Test {
def f(args: Array[String]) = args match {
case Array("-p", prefix, from, to) =>
prefix + from + to
case Array(from, to) =>
from + to
case _ =>
"default"
}
def main(args: Array[String]) {
assert(f(Array("1", "2")) == "12")
}
}
|