PartialFunction(偏函数)时间:2024-01-14 20:18:02 val one:PartialFunction[Int,String]={ case 1 => "one" case 2 => "two" case _ => "other numbers" } println(one(3))