date, and use it to group the components together - for the date usually expressed as 21 March 2004, we would probably write
Note that the order of the components is our choice - we might have instead written
date(21, mar, 2004)
date(2004, mar, 21)The choice of functor is arbitrary, too.
The components between the parentheses are referred to as
arguments. Thus in the date example, the arguments are
Structures may be nested, too - the following example groups a name and a date, perhaps the person's date of birth:
persondata(name(smith, john), date(28, feb, 1963))This term has two arguments, the first being
name(smith, john)and the second being
date(28, feb, 1963)
See also Bratko, section 2.1.3.