如何访问 Ramda.map 中的迭代数组?

How can I access iteration array in Ramda.map?

类似,只是我想改为访问数组。

Array.prototype.map 接受 (item, index, arr) => {}。如何在 Ramda.map 中访问 arr

谢谢

链接的问题引用了 addIndex 的 Ramda 文档,指出它

Creates a new list iteration function from an existing one by adding two new parameters to its callback function: the current index, and the entire list.

因此当您使用 addIndex 时,整个列表已经提供给您的函数。