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
If multiple, incomparable values are added to a sorted array, and subsequently removed, the sorted array should behave effectively like a plain array with push and pop. As yet, the search functions are returning indeterminate values and adding removing values from seemingly random positions.
One problem I see is that callers of search that deal in equality (eg searchFirst/Last) make assumptions about the equality of elements around the result index. But, search only guarantees that the index is somewhere in streak of one or more incomparable values.
I think the fix is to adjust searchFirst/Last to scan both left and right from search's index, then scan within that range for their final result.
If multiple, incomparable values are added to a sorted array, and subsequently removed, the sorted array should behave effectively like a plain array with push and pop. As yet, the search functions are returning indeterminate values and adding removing values from seemingly random positions.
See: montagejs/frb#13
The text was updated successfully, but these errors were encountered: