Skip to content

Commit ad5e4c5

Browse files
committed
Fix shadowed variable warning
1 parent 776a990 commit ad5e4c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Data/Array.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ insert = insertBy compare
178178
-- | determine the ordering of elements.
179179
insertBy :: forall a. (a -> a -> Ordering) -> a -> Array a -> Array a
180180
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)
181+
let i = maybe 0 (+ 1) (findLastIndex (\y -> cmp x y == GT) ys)
182+
in U.fromJust (insertAt i x ys)
183183

184184
--------------------------------------------------------------------------------
185185
-- Non-indexed reads -----------------------------------------------------------

0 commit comments

Comments
 (0)