blob: 54f0a7724b8b25f7a7e735e0106936ac6a13d94c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
object Foo {
def test(s: String) = {
(s: Seq[Char]) match {
case Seq('f', 'o', 'o', ' ', rest1: _*) =>
rest1
case Seq('b', 'a', 'r', ' ', ' ', rest2: _*) =>
rest2
case _ =>
s
}
}
}
|