Implement iterator protocol for branch enumerator