Categories
Mastering Development

Testing types of Prolog terms: slight problems

Here is some code to test the type/metatype of SWI-Prolog terms: % var,nonvar are meta-question about the state of computation, not about the term % Note: X can be a variable (if it is fresh) or a nonvar (if it is set) % but x can ever only be a nonvar typeof(X, var) :- var(X),!. […]