(defdetpred <
name
> <
num args
> <
body
>)
which defines a simple predicate that just runs lisp code and doesn't have to unify any variables. Arguments are referenced with:
(special-arg
<argnum>
)
. The body succeeds by default, but if a failure case arises, use:
(detpred-fail
<name>
<num args>
)
.
(defdetpred my-integer 1
(unless (integerp (special-arg 0))
(detpred-fail my-integer 1)))
KnowledgeWorks and Prolog User Guide (Unix version) - 6 Dec 2011