blob: 762bdb61e10e15d6c7eb60e59c540456f10186c7 (
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
}
}
}
|