19 public bool tailp { get { return (object) key == null; } }
21 public new string ToString ()
25 for (MPlist p = this; ! p.tailp; p = p.next)
27 str += (p == this ? "(" : " ") + p.key.ToString () + ":";
29 str += ((MSymbol) p.val).ToString ();
30 else if (p.val is MPlist)
31 str += ((MPlist) p.val).ToString ();
36 public object get (MSymbol key)
38 if ((object) key == null)
40 for (MPlist p = this; ! p.tailp; p = p.next)
46 public object put (MSymbol key, object val)
50 for (p = this; ! p.tailp; p = p.next)
63 p.next = new MPlist ();
68 public object push (MSymbol key, object val)
70 MPlist p = new MPlist ();
87 object val = this.val;
89 this.key = this.next.key;
90 this.val = this.next.val;
91 this.next = this.next.next;
95 public object add (MSymbol key, object val)
99 for (p = this; ! p.tailp; p = p.next);
104 p.next = new MPlist ();