🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: gmane.comp.ai.prolog.swi
1 messages
1 total messages Started by "ji min young" Mon, 15 Apr 2002 12:15
about comp/3
#10
Author: "ji min young"
Date: Mon, 15 Apr 2002 12:15
48 lines
1117 bytes

I'm studying about SWI-Prolog in my school.
i've got a question.

comp([b,l,a,c,k,b,o,a,r,d],[b,a,d],Ls).

Ls=[l,c,k,o,r];

No.

for above thing i have to write answer at ______

comp([],_____,_____).
comp([E|Ls1],Ls2,Ls3) :-
  mem(E,Ls2),
  !
  comp(_____,Ls2,Ls3).
comp(_____,Ls2,_____) :-
  comp(Ls1,Ls2,_____).

mem(E,[E|_]).
mem(E,[_|Ts]) :-
  mem(E,Ts).

i'm think about this for 1 week but i couldn't find answer.
if you have any idea
e-mail me.

_________________________________________________________________
http://messenger.msn.co.kr/ ¿¡¼­ MSN Messenger¸¦ ´Ù¿î·ÎµåÇÏ¿© ¿Â¶óÀÎ »ó¿¡ ÀÖ
´Â Ä£±¸¿Í ´ëÈ­¸¦ ³ª´©¼¼¿ä.


----------------
* To UNSUBSCRIBE, please use the HTML form at

    http://www.swi.psy.uva.nl/projects/SWI-Prolog/index.html#mailinglist

or send mail to prolog-request@swi.psy.uva.nl using the Subject: "unsubscribe"
(without the quotes) and *no* message body.

** An ARCHIVE of this list is maintained at

    http://www.swi.psy.uva.nl/projects/SWI-Prolog/mailinglist/archive/

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads