From 76175536c6b00f4bbd12da06436e6a57e12ec1f6 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 46dba689..e9346cc6 100644 --- a/Data/HashMap/Internal.hs +++ b/Data/HashMap/Internal.hs @@ -2311,8 +2311,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