13 Recursivity and lists (Ad)


Two notions which are central in Prolog are:

  1. Recursivity, and
  2. Lists

Recursivity is a concept which we find again and again in computer science: In programming problems, in data structures, in definitions of programming constructs, in languages, etc. Also in Prolog do we find several instances of recursivity, one of which is the way lists are defined and used. Some other places in Prolog where we find recursivity include the definition of structures and in recursive rules.

But what is recursivity? To answer this, we will first look at an instance of recursivity, namely the definition of lists. Then afterwards we will give a general definition of when something is recursive.

Prev: 12.6 Quiz: Prolog's solution strategy (Ad)
Up: Part III: Programming
Next: 13.1 The definition of a list (Ad)