11 assert(previous_->next_ == this);
14 assert(next_->previous_ == this);
20 Link<T>::Link( const T& thing ) :
23 previous_ = next_ = 0;
28 Link<T>::Link( Link<T>* previous, Link<T>* next, const T& thing ) :
54 Link<T>::add( const T& thing )
57 Link<T>* l = new Link<T>( this, next_, thing );
65 Link<T>::insert( const T& thing )
67 // Link<T>* l = new Link<T>( next_, this, thing );
69 Link<T>* l = new Link<T>( previous_, this, thing );
76 don't forget to adjust #l#'s top_ and bottom_.
80 Link<T>::remove(List<T> &l)
83 previous_->next_ = next_;
88 next_->previous_ = previous_;
90 l.bottom_ = previous_;