Haskell Language Monoid instance


Map k v provides a Monoid instance with the following semantics:

  • mempty is the empty Map, i.e. the same as Map.empty
  • m1 <> m2 is the left-biased union of m1 and m2, i.e. if any key is present both in m1 and m2, then the value from m1 is picked for m1 <> m2. This operation is also available outside the Monoid instance as Map.union.