if and else in prolog in a single rule

kuntilanak <[email protected]>
Newsgroups gmane.comp.gnu.prolog.general
Message-ID <[email protected]>
Say that I have one predicate called test (which just succeds or fails,
returns back yes or no), 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 ........

how can I represent all that in prolog in one single rule of test without
having to declare another test rule for this? Is there anyway I can get
around this?
-- 
View this message in context: http://www.nabble.com/if-and-else-in-prolog-in-a-single-rule-tp20228349p20228349.html
Sent from the Gnu - Prolog - Users mailing list archive at Nabble.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.