Help with member predicate in ESL Prolog-2 
Author Message
 Help with member predicate in ESL Prolog-2

I'm tyring to prepare a lecture on cuts for a class using ESL Prolog-2 (public
domain version).  My samples using the member predicate do not seem to be
working (that is, returning multiple responses when expected).  It could just
be that I'm a little rusty with Prolog, but my sense is that it is the
particular interpreter I am using.  I'd appreciate any help

I have defined member as follows (straight out of Sterling and Shapiro, p45)

    member(X,[Y|Ys]) :- member(X,Ys).

When I ask

    ?- member(a,[a,b,r,a,c,a,d,a,b,r,a]).

I get yes, with no continuation (trace shows an exit).

Though I will check the net for an answer, direct Email would be better.
Thanks in advance.

Joe Hales
Assistant Reserach Professor
Duke University Medical Center

Sat, 19 Aug 1995 02:21:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. more help with ESL Prolog-2

2. relative(X,Y) predicate in Prolog - please help!

3. Help me on the built in predicates in 'Open-Prolog

4. Q: ESL Prolog to "standard" syntax

5. ESL Prolog

6. Mudane question about ESL Prolog

7. Anybody with ESL-PD Prolog...

8. Need Help with joining strings, ESL interpreter.

9. HELP: ESL Error 173

10. What predicates should a teaching prolog have?

11. Problem with SWI Prolog and read predicate

12. setrand predicate on ciao-prolog


Powered by phpBB® Forum Software