摘要:
Scala中的match, 比起以往使用的switch-case有著更強大的功能,1. 傳統方法def toYesOrNo(choice: Int): String = choice match { case 1 => "yes" case 0 => "no" case _ => ... 阅读全文
摘要:
Scala中的match, 比起以往使用的switch-case有著更強大的功能,1. 傳統方法def toYesOrNo(choice: Int): String = choice match { case 1 => "yes" case 0 => "no" case _ => ... 阅读全文
|