Documentation Prolog Predicate Reference builtin arg/3

arg/3

Check the argument of a term in the nth position.

Description

arg( +integer, +compound_term, ?term )

arg(N, Term, Arg) is true if and only if the Nth argument of Term is Arg.

Implementation