Terms

Terms in Strawberry Prolog are defined as follows:

Atoms , numbers , character strings and variables are terms. Let f be an atom . Let t1 , ... , tn be terms. Then f(t1,...,tn) is a term too. The atom f is called the functor of this term, and t1 , ... , tn are called its arguments.

The last clause of the definition above presents the most universally available notation for terms. Terms whose functor is declared as operator, admit the functor between, or after their arguments too . This is called infix notation of terms. For example, arithmetical expressions admit both notations, e.g. +(2,X) is the same as 2 + X .