Closed Zomis closed 3 years ago
In table.map it says:
table.map
Calls mapper(value, key, tbl) on each element in the table, using the return as the new value for the key. (...) @tparam function mapper Takes in value, key, and tbl as parameters.
mapper(value, key, tbl)
value
key
tbl
But the implementation does not match this:
https://github.com/factoriolib/flib/blob/master/table.lua#L277
output[k] = mapper(v, k) (the third parameter, for table, is never passed)
output[k] = mapper(v, k)
Either the implementation should change, or the documentation.
Thanks, I fixed some other places in table where the docs included that third parameter.
table
In
table.map
it says:But the implementation does not match this:
https://github.com/factoriolib/flib/blob/master/table.lua#L277
output[k] = mapper(v, k)
(the third parameter, for table, is never passed)Either the implementation should change, or the documentation.