insertWith package:Agda
insertWith f s t new inserts an edge from s to
t into the graph. If there is already an edge from s
to t with label old, then this edge gets replaced by
an edge with label f new old, and otherwise the edge's label
is new. O(log n).
Insert with function merging new value with old value.