我希望能够写一些东西
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) {
}
每当谓词评估为真或假时,如何检查我的 Start 函数?我对谓词的使用正确吗?
谢谢