[prev] 37 [next]

Recursive Operations on Lists (cont)

Definition of List type:

// a Link is a pointer to any ListNode
typedef struct ListNode *Link;
// a ListNode contains an integer value
typedef struct ListNode {
   int  value;
   Link next;
} ListNode;
// a List is a pointer to the first ListNode
typedef Link List;

List vs Link ... same type, different usage.