## 24.4.4 Removal and Replacement Algorithms - `remove_if` (cont.)

>     void sieve(deque<int>& numbers)
>     {
>        if (numbers.empty())
>           return;
>        int n = numbers.front();
>        numbers.pop_front();
>        deque<int>::iterator p = remove_if(numbers.begin(),
>           numbers.end(), DivisibleBy(n));
>        numbers.erase(p, numbers.end());
>        sieve(numbers);
>        numbers.push_front(n);
>     }

prev |top |next