| structures/list-functions.c - Funktionen reverse. | Lektion 12 - slide 28 : 36 Program 4 |
/* Returned list in reverse order */
cons_cell *reverse(cons_cell *list){
if (list == NULL)
return NULL;
else
return append(reverse(tail(list)),
cons(head(list), NULL));
}