Next: , Up: ref-mod-ilm   [Contents][Index]


4.11.13.1 Predicates Defined in a Module

The built-in predicate current_predicate/2 can be used to find the predicates that are defined in a particular module.

To backtrack through all of the predicates defined in module m, use

| ?- current_predicate(_, m:Goal).

To backtrack through all predicates defined in any module, use

| ?- current_predicate(_, M:Goal).

This succeeds once for every predicate in your program. See mpg-ref-current_predicate.


Send feedback on this subject.