Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 7ebd25ac536d248d499a3ce2acda963a > files > 2973

Macaulay2-1.3.1-8.fc15.i686.rpm

-- -*- M2-comint -*- {* hash: 2136326027 *}

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

i6 :