iterator
🇺🇸
/ɪtə'reɪtə/
🇬🇧
/ɪtə'reɪtə/
A person or thing that goes through a process or a set of items one by one.
The researcher was an iterator, carefully examining each sample.
研究者是一个迭代器,仔细检查每个样本。
In programming, an object that lets a program access the elements of a collection one by one, without needing to know the collection's structure.
The iterator pattern allows for accessing elements in a list without revealing the list's internal structure.
迭代器模式允许访问列表中的元素,而不会暴露列表的内部结构。