pattern matching scala example Example: scala pattern matching Click to copylist match{ case head::tail => print(head) case _ => print("It is not list") }