Analyzing and Constructing Terms

The built-in predicate functor/3 performs these functions

The built-in predicate arg/3 performs these functions:

The built-in predicate Term =.. List performs these functions: