Implementing custom enumerators