I’m using: SWI-Prolog version 8.0.2.
I’ve noticed that some system predicates return values like a standard function in a procedural programming language. In other words, the system predicate can appear on the right hand side of an equal sign and therefore used in an assignment statement to a Prolog variable.
Is there a way to similarly “return” a value from a standard SWI-Prolog predicate?