What problem does it solve?
Prolog has exactly one data type: the term. No objects, no structs. This skill clarifies the term taxonomy and how to inspect and manipulate atoms, numbers, variables, and compound terms, including the use of functor/3, arg/3, =../2 (univ), and copy_term.
Core Features & Use Cases
- Term taxonomy: atoms, numbers, variables, and compound terms; explains arity, functor names, and how terms are composed.
- Inspection & construction: use functor/3, arg/3, and =../2 to deconstruct and build terms, and copy_term to obtain fresh copies with independent variables.
- Meta-programming & data representations: treat terms as data, perform dynamic goal construction, and serialize or transform term structures for analysis or transformation.
Quick Start
Explain the core Prolog term structures and demonstrate how to inspect, construct, and manipulate terms using functor/3, arg/3, and =../2.