Is “map” a loop?

后端 未结 15 1974
自闭症患者
自闭症患者 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条回答
  •  萌比男神i
    2020-12-14 15:02

    map is a higher-order function. The same applies to grep. Book Higher-Order Perl explains the idea in full details.

    It's sad to see that discussion moved towards implementation details, not the concept.

提交回复
热议问题