arg/3 [ISO]arg(+ArgNum, +Term, -Arg)
unifies Arg with the ArgNumth argument of term Term.
The arguments are numbered from 1 upwards.
instantiation_errortype_errordomain_error | ?- arg(2, foo(a,b,c), X).
X = b
functor/3, =../2, ref-lte-act.