Next: Constructing Data Structures
Up: Adding Computation Domains: CLP
Previous: Herbrand Terms: Syntactic Equality
-

- Functors can be thought of as representing non-interpreted
functions
-

- This function is applied (but not interpreted) to its arguments
-

- The main application of functors is as data structure
constructors
-

- Sample program, step by step
-

- We have a small database of people who are friends:
-
- friends(peter, mark).
friends(anna, marcia).
friends(anna, luca).
-
- ?- friends(anna, X).
X = marcia ;
X = luca
?- friends(X, anna).
no
-

- No friends?
Last modification: Thu Oct 7 12:04:03 MEST 1999 <webmaster@clip.dia.fi.upm.es>