Skip to content

Commit 253507a

Browse files
committed
Fix array initialization trick
1 parent dc790ab commit 253507a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Data/HashMap/Internal.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2310,7 +2310,7 @@ updateOrConcatWithKey :: Eq k => (k -> v -> v -> (# v #)) -> A.Array (Leaf k v)
23102310
updateOrConcatWithKey f ary1 ary2 = A.run $ do
23112311
let n1 = A.length ary1
23122312
let n2 = A.length ary2
2313-
mary <- A.new (n1 + n2) (A.index ary1 1)
2313+
mary <- A.new (n1 + n2) (A.index ary1 0)
23142314
-- copy over all elements from ary1
23152315
A.copy ary1 1 mary 1 (n1-1)
23162316
-- append or update all elements from ary2

0 commit comments

Comments
 (0)