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
I will admit that the readme examples aren't always great in showing the full behavior, their main intent is to show the syntax that triggers a rule, since the rules do not do any behavioral analysis of the callback.
The rule does indeed suggest to use reduceRight instead of reverse().reduce() and reduce instead of reverse().reduceRight().
Readme example:
The sums are a bad example since their order doesn't matter. Try this:
Did you mean to replace
.reverse().reduce()
with.reduceRight()
and vice-versa instead?The text was updated successfully, but these errors were encountered: