A compound term is a structured data item that consists of a functor followed by a sequence of one or more arguments which are enclosed in brackets and separated by commas. The general form of a compound term is:
functor( t 1 , t 2 , …, t n ) n ³ 1functor is the functor. It can be an atom or a variable name. (For further details about the use of a variable name as the functor please see the section below entitled "Meta-variables").
A compound term can be thought of as representing a record structure. The functor represents the name of the record, while the arguments represent the record fields. Certain functors can be written as operators. For more information see the section below entitled "Operators". Note: There must be no space between the functor and the opening parenthesis of a compound term.rm the body of the rule. Prolog then