No, but you can make some consistent and readable code
pragma solidity 0.4.19;
contract Okay {
modifier onlyIfOkay() {
require(isOkay(msg.sender));
_;
}
function isOkay(address checkOkay) public pure returns(bool isIndeed) {
// check something
return checkOkay==checkOkay;
}
function restricted() public view onlyIfOkay {
// carry on
}
}
That gives you the option of using isOkay(addr)/!isOkay(addr) when needed inside functions and a simple modifier for guarding functions (it assumes the most common case, we need to check the sender).
There are lots of ways to work out case-by-case details. I would urge caution/avoidance of a somewhat hazardous pattern:
modifier isOkay() {
_;
if(!ok) revert();
}
The hazard is in putting _; in front of the modifier steps because that might help camouflage a bug.
For the benefit of others:
If a modified function returns (looks normal enough to a reviewer), the modifier code will not execute because it won't get a chance to. It would be equivalent to:
return;
if(!ok) revert(); // <= unreachable code doesn't run
It will only seem like the modifier is in play in every case. Consequently, I'm leery about using that style.