We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 776a990 commit ad5e4c5Copy full SHA for ad5e4c5
src/Data/Array.purs
@@ -178,8 +178,8 @@ insert = insertBy compare
178
-- | determine the ordering of elements.
179
insertBy :: forall a. (a -> a -> Ordering) -> a -> Array a -> Array a
180
insertBy cmp x ys =
181
- let index = maybe 0 (+ 1) (findLastIndex (\y -> cmp x y == GT) ys)
182
- in U.fromJust (insertAt index x ys)
+ let i = maybe 0 (+ 1) (findLastIndex (\y -> cmp x y == GT) ys)
+ in U.fromJust (insertAt i x ys)
183
184
--------------------------------------------------------------------------------
185
-- Non-indexed reads -----------------------------------------------------------
0 commit comments