=.. /2
[ISO]+Term =..
-List
-Term =..
+List
Unifies List with a list whose head is the atom corresponding to the principal functor of Term and whose tail is a list of the arguments of Term.
If Term is uninstantiated, then List must be instantiated either to a proper list whose head is an atom, or to a list of length 1 whose head is a number.
This predicate is not strictly necessary, since its functionality can
be provided by arg/3
and functor/3
, and using the latter
two is usually more efficient.
| ?- product(0, n, n-1) =.. L. L = [product,0,n,n-1] | ?- n-1 =.. L. L = [-,n,1] | ?- product =.. L. L = [product]
instantiation_error
type_error
domain_error
representation_error
functor/3
, arg/3
, ref-lte-act.