//Excerpt from visionary.C class nearby_enemy_of { const wabbit *const w; const unsigned radius; public: nearby_enemy_of(const wabbit *initial_w, int initial_radius) : w(initial_w), radius(initial_radius) {} bool operator()(const wabbit *other) const throw (terminal::different) { return other != w && other->hungry() > w->bitter() && distance(other, w) <= radius; } };