insert(), attach(), operator =, copy constructor (2 points each) (also, 2 points for _not_ listing the default constructor)
double return_ith_item(sequence s, size_t i)
{
s.start();
for (size_t j=1; j < i; j++)
s.advance();
return s.current();
}
(a)
void set_to_x (node *head_ptr, int x)
{
node *p;
for (p=head_ptr; p!=NULL; p=p->link())
p->set_data(x);
return;
}
(b)
void set_to_x (node *head_ptr, int x)
{
if (head_ptr == NULL)
return;
else{
head_ptr->set_data(x);
set_to_x(head_ptr->link(), x);
return;
}
}