dateand the structure
date(2004, mar, 21)are terms. So are the numbers
21, for that matter. So in
date(2004, mar, 21), the primary functor is
date, the arity is 3, and the arguments are
In general, a term of arity n can be an
followed by n arguments, which will be enclosed
( ) and separated by commas. Note that the arity
might be 0, in which case there are no parentheses, commas, or arguments.
A term can also be a number. Sometimes the term can use an
infix operator like
in which case the functor appears between the arguments
(if the arity is 2) or before the argument but without
parentheses (if the arity is 1).
– (and occasionally
?) signs in front of arguments, in procedure header
comments, see comments.