You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
map()s callable receives two arguments, the value and its index. This makes using standard library functions like trim and intval problematic without wrapping them in an anonymous or arrow function (because those functions have a second argument that alters behaviour).
It would be useful to have an alternative map() that does not supply the index. Without breaking the API this would need to be something like mapValue(), whereas it might have been preferable to have map() and mapWithIndex().
In part, the lack of documentation for each of Chain's methods, in regards to the Callable's parameters, doesn't help, without digging into the source.
The text was updated successfully, but these errors were encountered:
map()
s callable receives two arguments, the value and its index. This makes using standard library functions liketrim
andintval
problematic without wrapping them in an anonymous or arrow function (because those functions have a second argument that alters behaviour).It would be useful to have an alternative
map()
that does not supply the index. Without breaking the API this would need to be something likemapValue()
, whereas it might have been preferable to havemap()
andmapWithIndex()
.In part, the lack of documentation for each of
Chain
's methods, in regards to the Callable's parameters, doesn't help, without digging into the source.The text was updated successfully, but these errors were encountered: