| allows term construction and decomposition.
+CompoundTerm =.. ?List
-CompoundTerm =.. +List
If CompoundTerm is not a variable then List is a list
whose head is the functor of CompoundTerm and whose tail
is the list of its arguments.
If CompoundTerm is a variable then List must have at least
one element. The head of list must be an atomic term.
It is the functor of CompoundTerm and
the elements of the tail are the arguments. If the head of the list
is a number, the tail of the list must be empty.
'=..' is predefines as infix operator. Its predefines priority is 700
and it is non-associative (see current_op/3).
Arguments
CompoundTerm compound term or atomic term
List list (not empty)
Examples
| f(a,b,c) =.. X. |
Succeeds with substitution X <- [f,a,b,c]. |
| '=..'(X, [f,1,Y]). |
Succeeds with substitution X <- f(1,Y).
|
| 1.3 =.. L. |
Succeeds with substitution L <- [1.3].
|
| f(a,b,c) =.. [f,X,Y]. |
Fails. |
Standard
This predicate is part of the ISO-Prolog Standard.
See also
arg/3,
copy_term/2,
functor/3.
|