Enumeration to iterable code