class Test def main is shared Test().run def run # assert List(.numbers) == [1, 2, 3] t = List(.numbers) assert t == [1, 2, 3] def numbers as IEnumerable #return [1, 2, 3] to passthrough for i in [1, 2, 3] yield i def numbers2 as IEnumerator for i in [1, 2, 3] yield i