A function call made by a recursive function to another instance of itself. For example, recursively finding the length of a linked list (in C):
int bleah(LinkedList * list, int * snarf)
{
if(list) {
bleah(list->next, snarf); /* the recursive call */
}
else {
/* this is the base case, don't recurse further */
}
return ++(*snarf);
}
int main()
{
int snarf = -1;
return bleah(huge_global_list, &snarf);
}
|