Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!hplabs!hp-ses!hpbbn!hpbbi4!stefan From: stefan@hpbbi4.HP.COM (#Stefan Bachert) Newsgroups: comp.lang.prolog Subject: Re: Re: loops in prolog Message-ID: <470003@hpbbi4.HP.COM> Date: 1 Mar 90 11:19:31 GMT References: <1032@fs1.ee.ubc.ca> Organization: Hewlett-Packard GmbH Lines: 21 Hello, you are right. A cut before action_3 will clarify the situation. I am not sure that you get me right with the idea of once_true. So I repeat it here once_true(X):-call(X),!. % predicate X is determinated once_true(_). % and always true loop:- repeat, once_true(action_1), (not condition;once_true(action_2),fail),!, once_true(action_3). You proposal will still eat up the stack. I think the basenote author has to judge what proposal fit for his problem. Stefan Bachert PS: I don't like ->/2 because of its dubious definition.