added an iterator filter

Implemented an iterator that allows a callback function to filter and
transform incoming references.