| structures/list-functions.c - Funktionen append. | Lektion 12 - slide 28 : 36 Program 2 |
/* Append list1 and list2. The elements in list2 are shared between
the appended list and list2 */
cons_cell *append(cons_cell *list1, cons_cell *list2){
if (list1 == NULL)
return list2;
else return cons(head(list1),
append(tail(list1),list2));
}