[Haskell-cafe] Data.Map

Sebastian Sylvan sebastian.sylvan at gmail.com
Sun Apr 3 07:54:04 EDT 2005


On Apr 3, 2005 9:38 AM, Gracjan Polak <gracjan at acchsh.com> wrote:

> insertList asclist map = union map (Data.Map.fromList asclist)

How about:

insertList :: (Ord a) => Map a b -> [(a, b)] -> Map a b
insertList = foldr (uncurry insert) 


/S
-- 
Sebastian Sylvan
+46(0)736-818655
UIN: 44640862


More information about the Haskell-Cafe mailing list