December 2021
Beginner
840 pages
47h 29m
English
An inductive data type is an aggregate data type that refers to itself. In other words, the type being defined is one of the constituent types of the type being defined. A node in a singly linked list is a classical example of an inductive data type. The node contains some value and a pointer to the next node, which is also of the same node type:
Technically, this example type is not an inductive data type because the type being defined (struct node_tag) is not a member of itself. Rather, this type contains a pointer to a value of its type (struct node_tag*). This discrepancy highlights a key difference ...