你能建议一种方法来提升这两个功能吗?谢谢!
def maxY(f: (Int, Int) => Int, z: Int) = (0 to z).filter(f(0, _) <= z).max
def maxX(f: (Int, Int) => Int, z: Int) = (0 to z).filter(f(_, 0) <= z).max
你能建议一种方法来提升这两个功能吗?谢谢!
def maxY(f: (Int, Int) => Int, z: Int) = (0 to z).filter(f(0, _) <= z).max
def maxX(f: (Int, Int) => Int, z: Int) = (0 to z).filter(f(_, 0) <= z).max