I'm struggling to understand how to properly use the discontiguous/1
predicate in (SWI) Prolog.
Let buumi.pl
be this little file of pseudo-facts:
discontiguous(buumi/1).
buumi(eins).
buri(zwei).
buumi(drei).
Running swipl -s Buumi.pl
however still gives this warning:
% swipl -s Buumi.prolog
Warning: [...]/Buumi.prolog:5:
Clauses of buumi/1 are not together in the source-file
The documentation is quite vague and simply states
discontiguous :PredicateIndicator, ...
but gives no concrete example on how to use it. I've found some examples that suggest that I'm using it correctly; at the very least, swipl doesn't complain, but then again, it doesn't honour my request either. What am I doing wrong here?
discontiguous/1
is an ISO directive. You have to put it as
:- discontiguous(pred/2).
at the beginning of the Prolog text.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With