我希望能够写的东西作为如何界定谓词作为函数参数
void Start(some condition that might evaluate to either true or false) {
//function will only really start if the predicate evaluates to true
}
我猜它一定是形式的东西:
void Start(Predicate predicate) {
}
我怎样才能检查里面我的开始函数,只要谓词评估为真或假?我使用的谓词是否正确?
谢谢