def isZero(x: Int) = x == 0
def eval(x: Int, g: Int => Boolean) = g(x)
//Just passes 0 and f to eval
def passToEval(f: Int => Boolean): Boolean = {
eval(0, f)
}
//true
passToEval(isZero)
问题是,我怎样才能将 !f 传递给方法 eval?我对涉及 passToEval 参数的解决方法不感兴趣