From fcab796c6edda7be85549117a7af50377a1a7e75 Mon Sep 17 00:00:00 2001 From: Simon Jakobi Date: Mon, 25 Apr 2022 02:51:35 +0200 Subject: [PATCH] Add comments --- Data/HashMap/Internal.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Data/HashMap/Internal.hs b/Data/HashMap/Internal.hs index c919e4c8..67a79832 100644 --- a/Data/HashMap/Internal.hs +++ b/Data/HashMap/Internal.hs @@ -2310,8 +2310,9 @@ updateOrConcatWithKey :: Eq k => (k -> v -> v -> (# v #)) -> A.Array (Leaf k v) updateOrConcatWithKey f ary1 ary2 = A.run $ do let n1 = A.length ary1 let n2 = A.length ary2 + -- initialize output array with first element of ary1 mary <- A.new (n1 + n2) (A.index ary1 0) - -- copy over all elements from ary1 + -- copy over remaining elements from ary1 A.copy ary1 1 mary 1 (n1-1) -- append or update all elements from ary2 let go !iEnd !i2 !iMut