Question : scala pattern matching
Answered by : inexpensive-impala-hb26kru22zmb
list match{
case head::tail => print(head)
case _ => print("It is not list")
}
Source : | Last Update : Sun, 12 Jul 20
Answered by : inexpensive-impala-hb26kru22zmb
list match{
case head::tail => print(head)
case _ => print("It is not list")
}
Source : | Last Update : Sun, 12 Jul 20