Next: Constructing Recursive Data Structures
Up: Adding Computation Domains: CLP
Previous: Constructing Data Structures
-
- Functors allow constructing recursive data structures
-
- Simplest recursive data structure: Peano natural numbers
- z is a Peano number (meaning zero, 0)
- s(N) is a Peano number if N is a Peano number
(meaning the successor of ,
i.e., )
-
- Logic characterization of Peano numbers:
-
- natural(z).
natural(s(N)):- natural(N).
-
- Note: very similar to the CLP()
program
Last modification: Thu Oct 7 12:04:03 MEST 1999 <webmaster@clip.dia.fi.upm.es>