struct node { int first; struct node *rest; struct node *prev; }; struct node *cons(int v, struct node *lst); void add_after(int v, struct node *nptr); struct node *remove_first(struct node *lst, int key);