bool operator()(I first, S last, F pred, P proj = P{}) const { auto &&ipred = as_function(pred); auto &&iproj = as_function(proj); for(; first != last; ++first) if(ipred(iproj(*first))) return true; return false; }
bool operator()(I first, S last, F pred, P proj = P{}) const { auto &&ipred = as_function(pred); auto &&iproj = as_function(proj); for(; first != last; ++first) if(!ipred(iproj(*first))) break; return first == last; }