For Programmers: Free Programming Magazines  


Home > Archive > Prolog > January 2006 > help in a simple program









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author help in a simple program
Poly

2006-01-06, 11:11 am

Hi all,
I am learning prolog now, and I made a simple program, but it doesnt work!
If anybody can help me....

That is the program:

app([],Ys,Ys).
app([X|Xs],Ys,[X|Zs]):- app(Xs,Ys,Zs).


ante(X1,[X1|_],[]).
ante(X1,[Y1|X1],Y1).
ante(X1,[Y1|Xs1],Y1):- app(X1,_,Xs1).

obs.: there are brazilians here? I am brazilian.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com