I'm new to functors (still trying to grasp the concept) and I wanted to know if I can do the same as the following code with a functor? It basically converts a vector of a two item struct into two vectors.

Code:
typedef struct
{
short A;
short B;
} MyData;

..........

std::vector<MyData> history;
........

const unsigned int listSize = history.size();
std::vector<short> myA, myB;
 
for (int i = 0; i < listSize; i++)
{
	//extract A data from history
	myA.push_back(history[i].A);
	//extract p-p interval data from history
	myB.push_back(history[i].B);
}