public bool empty { get { return (first == null); } }
public object pop() { if (first == null) throw new exception("can't pop from an empty stack."); else { object temp = first.value; first = first.next; return temp; } }
public void push(object o) { first = new node(o, first); }
class node { public node next;
public object value;
public node(object value): this(value, null) {}
public node(object value, node next) { next = next; value = value; } } }