blob: 419b6636971eb357857329f6cbce2f0c4e223d1f (
plain) (
tree)
|
|
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)
}
}
|