Open mniip opened 6 months ago
The documentation for Data.Map.Lazy.mergeWithKey states:
Data.Map.Lazy.mergeWithKey
a nonempty subtree present only in the first map is passed to only1 and the output is added to the result; a nonempty subtree present only in the second map is passed to only2 and the output is added to the result.
only1
only2
Yet this example shows otherwise:
M.mergeWithKey (\k x y -> traceShow ("merge", k, x, y) $ Just x) (\m -> traceShow ("left", m) M.empty) (\m -> traceShow ("right", m) M.empty) M.empty M.empty `seq` ()
("right",fromList []) ()
The same isssue exists in the Strict version, and in both IntMap versions.
The documentation for
Data.Map.Lazy.mergeWithKey
states:Yet this example shows otherwise:
The same isssue exists in the Strict version, and in both IntMap versions.