#include \"node1.h\" #include \"list.h\" #include // Provides assert #include using namespace std; value_type head(list lst) { list p; p=list_locate(lst,1); return p->data(); } list tail(list lst) { node *head=NULL; node *tail=NULL; list_copy(lst, head, tail); list_head_remove(head); return head; } bool list_is_empty(list lst) { size_t n= list_length(lst); if(n==0) return true; else return false; } list cons(value_type val, const list lst) { node *head=NULL; node *tail=NULL; list_copy(lst, head, tail); list_head_insert(head, val); return head; } Solution #include \"node1.h\" #include \"list.h\" #include // Provides assert #include using namespace std; value_type head(list lst) { list p; p=list_locate(lst,1); return p->data(); } list tail(list lst) { node *head=NULL; node *tail=NULL; list_copy(lst, head, tail); list_head_remove(head); return head; } bool list_is_empty(list lst) { size_t n= list_length(lst); if(n==0) return true; else return false; } list cons(value_type val, const list lst) { node *head=NULL; node *tail=NULL; list_copy(lst, head, tail); list_head_insert(head, val); return head; }.