- Usage:
`z = merge(x,y,g)`

- Function: merge
- Inputs:
`x`, a hash table`y`, a hash table`g`, a function, a function of two variables to be used to combine a value of`x`with a value of`y`when the corresponding keys coincide.

- Outputs:
`z`, a hash table, a new hash table whose keys are the keys occurring in`x`or in`y`; the same values are used, except that if if a key`k`occurs in both arguments, then`g(x#k,y#k)`is used instead, unless`g`evaluated continue, in which case the key`k`does not appear in the result.

If `x` and `y` have the same class and have the same parent, then so will `z`.

This function is useful for multiplying monomials or adding polynomials. We illustrate that with a simple-minded implmentation of the free abelian group on the set of strings, representing an element as a type of hash table that associates coefficients to strings.

i1 : Free = new Type of HashTable o1 = Free o1 : Type |

i2 : p = new Free from { "x" => 2, "y" => 3, "cat" => 5 } o2 = Free{cat => 5} x => 2 y => 3 o2 : Free |

i3 : q = new Free from { "x" => 100, "y" => 200, "dog" => 7 } o3 = Free{dog => 7} x => 100 y => 200 o3 : Free |

i4 : Free + Free := (p,q) -> merge(p,q,plus); |

i5 : p+q o5 = Free{cat => 5} dog => 7 x => 102 y => 203 o5 : Free |

- combine -- combine hash tables