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
This loses all information of the order of reversed tuples, I usually have to use the following code to override the behaviour of Array.prototype.reverse
And in general reverse() is troublesome for tuples, because it modifies the array in-place.
Yeah tuples should be immutable by definition, so I get how this would be troublesome here. I only know of dirty tricks to avoid this (like [...array].reverse()) so I understand the issue, thanks for the comment
Activity
MartinJohns commentedon Nov 24, 2024
Related: #13360 (comment)
And in general
reverse()is troublesome for tuples, because it modifies the array in-place.redpulp commentedon Nov 24, 2024
Yeah tuples should be immutable by definition, so I get how this would be troublesome here. I only know of dirty tricks to avoid this (like
[...array].reverse()) so I understand the issue, thanks for the comment