unionsWith -package:Agda

The union of a list of maps, with a combining operation.
unionsWith (++) [(fromList [(5, "a"), (3, "b")]), (fromList [(5, "A"), (7, "C")]), (fromList [(5, "A3"), (3, "B3")])]
== fromList [(3, "bB3"), (5, "aAA3"), (7, "C")]
The union of a list of maps, with a combining operation: (unionsWith f == foldl (unionWith f) empty).
unionsWith (++) [(fromList [(5, "a"), (3, "b")]), (fromList [(5, "A"), (7, "C")]), (fromList [(5, "A3"), (3, "B3")])]
== fromList [(3, "bB3"), (5, "aAA3"), (7, "C")]
The union of a list of maps, with a combining operation.
unionsWith (++) [(fromList [(5, "a"), (3, "b")]), (fromList [(5, "A"), (7, "C")]), (fromList [(5, "A3"), (3, "B3")])]
== fromList [(3, "bB3"), (5, "aAA3"), (7, "C")]
Combine a list of maps. When a key exists in two different maps, apply a function to both of the values and use the result of that as the value of the key in the resulting map.
The union of a list of maps, with a combining operation.
The union of a non-empty list of maps, with a combining operation: (unionsWith f == foldl1 (unionWith f)).
unionsWith (++) (fromList ((5, "a") :| [(3, "b")]) :| [fromList ((5, "A") :| [(7, "C")]), fromList ((5, "A3") :| [(3, "B3")])])
== fromList ((3, "bB3") :| [(5, "aAA3"), (7, "C")])
The union of a non-empty list of maps, with a combining operation: (unionsWith f == foldl1 (unionWith f)).
unionsWith (++) (fromList ((5, "a") :| [(3, "b")]) :| [fromList ((5, "A") :| [(7, "C")]), fromList ((5, "A3") :| [(3, "B3")])])
== fromList ((3, "bB3") :| [(5, "aAA3"), (7, "C")])
The union of a list of maps, with a combining operation: (unionsWith f == foldl (unionWith f) empty).
The union of a list of maps, with a combining operation: (unionsWith f == foldl (unionWith f) empty).
The union of a list of maps, with a combining operation: (unionsWithKey f == foldl (unionWithKey f) empty).
The union of a list of maps, with a combining operation: (unionsWithKey f == foldl (unionWithKey f) empty).