// 조건자(predicator, 술어) : bool을 리턴하는 함수 또는 함수객체
// 선형검색의 정의: 주어진 구간에서 주어진 조건을 만족하는 요소를 찾는것.
bool foo( int a )
{
        return a > 5;
}
bool goo( int a )
{
        return a % 3 == 0;
}
void main()
{
        int x[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
        int* p = remove_if( x, x+10, foo );
        copy( x, p, ostream_iterator<int>( cout, " " ) );
        cout << endl;
        int* p1 = find( x, x+10, 4 );
        int* p2 = find_if( x, x+10, goo );
        cout << *p2 << endl;
}