Is “map” a loop?

后端 未结 15 1979
自闭症患者
自闭症患者 2020-12-14 14:29

While answering this question, I came to realize that I was not sure whether Perl\'s map can be considered a loop or not?

On one hand, it quacks/walks l

15条回答
  •  旧巷少年郎
    2020-12-14 14:58

    map itself is generally implemented using a loop of some sort (to loop over iterators, typically), but since it is a higher-level structure, it's often not included in lists of lower-level control structures.

提交回复
热议问题