Is this pattern match redundant?

前端 未结 0 1499
南笙
南笙 2020-12-01 03:56

I recently fell over a scala pattern match, that looked more or less like this:

def func (li :List[Int]): List[Int] = li match {
  case Nil => Nil
  case s         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题