bool contains::operator()(Output v) const { if (exp==Expression(v)) return true; foreach_ (OptExp oe, v.args()) if (oe && apply(oe.get())) return true; return false; }