Skip to content

Commit f13f246

Browse files
committed
Fix array initialization trick
1 parent 0301a33 commit f13f246

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Data/HashMap/Internal.hs

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

0 commit comments

Comments
 (0)