Salesforce Interview Question

Design a iterator (given certain conditions)