Salesforce interview question

Design a iterator (given certain conditions)