def test_Map_is_monoidal(): m = Map({'a': 10}) n = Map({'b': 7}) o = Map({'c': 4}) assert Map.mappend(m, Map.mappend(n, o)) == \ Map.mappend(Map.mappend(m, n), o)
def test_Map_mappend(): m = Map({'a': 10}) n = Map({'b': 7}) assert m.mappend(n) == Map({'a': 10, 'b': 7})