#pragma once

typedef struct pair {
	void * first;
	void * second;
} pair;

pair * new_pair( void * first, void * second );

pair * copy_pair( const pair * src, 
	void * (* copy_first)(const void *), void * (* copy_second)(const void *));

void free_pair( pair * p, void (* free_first)(void *), void (* free_second)(void *));

int cmp_pair( const pair * a, const pair * b, 
	int (* cmp_first)(const void *, const void *), int (* cmp_second)(const void *, const void *));
