
23 Feb
2005
23 Feb
'05
4:31 p.m.
Would it not be more efficient to put the list into a new map, and then merge the old and new maps
Sometimes yes. The function
insertList_union :: Ord k => [(k,a)] -> Map.Map k a -> Map.Map k a insertList_union kas = Map.union (Map.fromList kas)
is faster on inserting m>n new elements into a map of size n and slower
on inserting m