#include "stack4.h" #include #include typedef struct list *list; struct list { void *element; list next; }; list cons(void *element, list l) { ... } struct stack { list elements; }; list list_copy(list l) { return l == NULL ? NULL : cons(l -> element, list_copy(l -> next)); } stack stack_copy(stack s) { stack temp = malloc(sizeof(struct stack)); temp -> elements = list_copy(s -> elements); return temp; }