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
The Array.o() function runs in an infinite loop if the argument given to it is both
> 1
not an integer
For example, [1,2,3]o1.5. This seems to be due to the fact that the loop used in that function relies on the counter becoming equal to zero, and that never occurs with a non-integer value.
The text was updated successfully, but these errors were encountered:
Found it when working on Fold a List in Half on PPCG; I was trying to pop the last Ul /2 items from the array and that would crash on an odd input array length. (I did get it working using Number.c() though)
So for some reason it only occured to me now, 2 days later, that you're talking about Array.o() instead of Number.o(). I think the entire conversation makes sense either way though, other than the bug not existing on Number.o()...
The
Array.o()
function runs in an infinite loop if the argument given to it is both> 1
For example,
[1,2,3]o1.5
. This seems to be due to the fact that the loop used in that function relies on the counter becoming equal to zero, and that never occurs with a non-integer value.The text was updated successfully, but these errors were encountered: