Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New with Prolog----> Help with list

Status
Not open for further replies.

jbaron

Programmer
May 13, 2005
1
GR
Hello i want help with a scholl excercise about lists in prolog...
It says write a program that will check a list (We give the list, exmp. sort([1,2,3,4,5]). )
when the list is sorted from lower two bigger must return
yes. otherwise no.
this is what i have written so far...

sort([X,Y|T]):-
X=<Y,
sort([ --> what to put in here? <-- ]).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top