aboutsummaryrefslogblamecommitdiff
path: root/tests/patmat/t4408.scala
blob: 419b6636971eb357857329f6cbce2f0c4e223d1f (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                                    
object Test {
  def printList(in: List[String]): Unit = in match {
    case Nil => Unit

    case (s: String) :: Nil =>
      println(s)

    case head :: (s: String) :: Nil =>
      printList(head :: Nil)
      for(i <- head){
        print(i)
      }
      println
      println(s)
  }
}