Greetings. I have a quick Prolog question. I’m looking at:
- http://www.swi-prolog.org/pldoc/man?section=examineprog
- http://www.swi-prolog.org/pldoc/man?section=listing
and I’m hoping to enumerate or to iterate, in a query, all of the asserted expressions. Are there any best practices to enumerate or to iterate, in a query, all of the asserted expressions? I’d like for a query variable to unify with each asserted expression, in sequence.
I’m also interested in providing a list interface to the asserted expressions for specific predicates (e.g. nth_clause/3
) as well as across all predicates used in asserted expressions.