Chapter 6 introduced arithmetic operators . In this chapter we will equate them to the standard Prolog data structures, and learn how to define any functor to be an operator. You can define any functor to be an operator, in which case the Prolog listener will be able to read the structure in a different format. The fact that location is an operator is of NO significance to Prolog's pattern matching. It simply means there is an alternative way of writing the same term.
Operators are of three types.
They have a number representing precedence which runs from 1 to 1200. When a term with multiple operators is converted to pure syntax, the operators with higher precedences are converted first. A high precedence is indicated by a low number. Associativity in the second argument is represented by a pattern that defines the type of operator. The 'f' indicates the position of the operator in respect to its arguments.