The example generalized
Instead of requiring an InSeq, we can use any class with the right properties
template<class S, class X>
bool find(S& s, X x)
{
while (s.avail()) {
if (s.next() == x)
return true;
}
return false;
}
Previous slide
Next slide
Back to first slide
View graphic version