int vector_contains(struct vector *vector, void *data, int (*compare_to)(void *, void *)) { int i = 0; for (i = 0; i < vector->length; i++) { if (compare_to(data, vector->elements[i]->data) == 0) return 1; } return 0; }
inline bool operator>=(const self& rhs) const { return (compare_to(rhs) >= 0); }
inline bool operator<(const self& rhs) const { return (compare_to(rhs) < 0); }