I have a function called :
match_pre([test], K) :- !, append([S|T],_, K), length([S|T],1), test(S)
and I have a huge database of predicates which succeeds if S is in the database, example:
test(a).
test(b).
test(z).
test(u).
test(h).
etc......
Now I want to create another function that...
Say that I have one predicate called test, and I have another predicate called checker, basically here's what I am trying to do in Prolog:
test :- checker(T), if checker suceeds(i.e, returns yes)
then print bla..bla..bla otherwise
checker processes the remaining predicates here ...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.