:- module(_,_).
% Structure Inspection: Examples for functor/3 and arg/2 

% functor/3
% Try:
% ?- functor(t(b,a),F,A).
% ?- functor(Term,f,3).
% ?- functor(Vector,v,100).

% arg/2
% Try: 
% ?- _T=date(9,February,1947), arg(3,_T,X).

% Same, using unification: 
% ?- _T=date(9,February,1947), _T=date(_,_,X).

% (_ in _T instructs top level not to print value of _T)

% ?- functor(Array,array,5), arg(1,Array,black), arg(5,Array,white).

% What does the following return? Explain why!
% ?- arg(2, [a,b,c,d], X).
