12 assert(previous_->next_ == this);
15 assert(next_->previous_ == this);
22 Link<T>::Link( const T& thing ) :
25 previous_ = next_ = 0;
30 Link<T>::Link( Link<T>* previous, Link<T>* next, const T& thing ) :
56 Link<T>::add( const T& thing )
59 Link<T>* l = new Link<T>( this, next_, thing );
67 Link<T>::insert( const T& thing )
69 // Link<T>* l = new Link<T>( next_, this, thing );
71 Link<T>* l = new Link<T>( previous_, this, thing );
78 don't forget to adjust #l#'s top_ and bottom_.
82 Link<T>::remove(List<T> &l)
85 previous_->next_ = next_;
90 next_->previous_ = previous_;
92 l.bottom_ = previous_;