public Bag subtract(Bag subtrahend)
{
string m = guts;
string s = subtrahend.guts;
string difference = "";
while (true)
{
if (s.Length == 0) return new Bag(difference + m);
if (m.Length == 0) return null;
{
char s0 = s[0];
char m0 = m[0];
if (m0 > s0) return null;
if (m0 < s0)
{
m = m.Substring(1);
difference += m0;
continue;
}
System.Diagnostics.Trace.Assert(m0 == s0,
"internal error! Aggggh");
m = m.Substring(1);
s = s.Substring(1);
}
}
}