@@ -353,20 +353,16 @@ fromList : [(comparable,v)] -> Dict comparable v
353353fromList assocs = List.foldl (\(k,v) d -> insert k v d) empty assocs
354354
355355{-| Keep a key-value pair when it satisfies a predicate. -}
356−filter : (comparable -> v -> Bool)
357− -> Dict comparable v
358− -> Dict comparable v
359−filter p =
356+filter : (comparable -> v -> Bool) -> Dict comparable v -> Dict comparable v
357+filter p dict =
360358 let add k v t = if p k v then insert k v t else t
361− in foldl add empty
359+ in foldl add empty dict
362360
363361{-| Partition the Dict according to a predicate. The first Dict contains all
364362key-value pairs which satisfy it; the second contains the rest. -}
365−partition : (comparable -> v -> Bool)
366− -> Dict comparable v
367− -> (Dict comparable v, Dict comparable v)
368−partition p =
363+partition : (comparable -> v -> Bool) -> Dict comparable v -> (Dict comparable v, Dict comparable v)
364+partition p dict =
369365 let add k v (t1, t2) = if p k v
370366 then (insert k v t1, t2)
371367 else (t1, insert k v t2)
372− in foldl add (empty, empty)
368+ in foldl add (empty, empty) dict