-
for a table with a list field i'm trying to call map
using the table object works:
but using the underscore api (chain expressions) fails:
cross posted from stackoveflow: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Reposting my answer from StackOverflow: The underscore API in this context would be ambiguous here as to whether it refers to a lambda parameter or the outer table. As I say here, there's no real reason to prevent use of the second case in a call to For example: t.my_array_col.map(lambda x: _.a + x) It's not clear how to reliably determine what the underscore means when mixed like in your original example, and we don't want to prevent valid uses of it in the underscore-as-outer-table use, so that's its meaning. |
Beta Was this translation helpful? Give feedback.
Reposting my answer from StackOverflow:
The underscore API in this context would be ambiguous here as to whether it refers to a lambda parameter or the outer table.
As I say here, there's no real reason to prevent use of the second case in a call to
ArrayMap
.For example:
It's not clear how to reliably determine what the underscore means when mixed like in your original example, and we don't want to prevent valid uses of it in the underscore-as-outer-table use, so that's its meaning.