2 cons.hh -- declare LISP like datatypes
4 source file of the GNU LilyPond music typesetter
6 (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
37 class Killing_cons : public Cons<T>
40 Killing_cons (T *t, Cons<T> *p)
44 virtual ~Killing_cons ();
48 /// remove the link pointed to by *p.
50 Cons<T> *remove_cons (Cons<T> **pp)
65 Cons_list () { head_ =0; tail_ = &head_; }
66 void append (Cons<T> *c)
71 tail_ = &(*tail_)->next_;
73 Cons<T> *remove_cons (Cons<T> **pp)
75 if (&(*pp)->next_ == tail_)
78 return ::remove_cons (pp);
85 ~Cons_list () { junk (); }
90 void copy_killing_cons_list (Cons_list<T>&, Cons<T> *src);
93 clone_killing_cons_list (Cons_list<T>&, Cons<T> *src);