novice at prolog- need help with quicksort



Hello
recently I have been introduced to prolog at my university. Our assignment entails us benchmarking quicksort in different languages, including prolog. Our lecturer gave us a hint not to use append within prolog. I have came across a version of this but it will not work because GNU doesn't have the built in predicates for not(X) and order(x,y). Could you please help? an example would be fantatic.
Here is the version of quicksort I have came across.

split(H,[A|X],[A|Y],Z):- order(A,H),split(H,X,Y,Z).
split(H,[A|X],Y,[A|Z]):- not(order(A,H)), split(H,X,Y,Z).
split(_,[],[]).
quicksort([],X,X).
quicksort([H|T],S,X):-split(H,T,A,B),quicksort(A,S,[H|Y]), quicksort(B,Y,X).

Thanks
-JOhn
.



Relevant Pages

  • Re: Cat among the pigeons......
    ... > And your lecturer look at you with a knowing nod when you mentioned ... Since the lecturer was Claude Sammut,who wrote UNSW Prolog one of the ... Claude is a professor these days. ...
    (borland.public.delphi.non-technical)
  • Re: compare element in a list prolog
    ... urdad@hotmail.com (kimos) writes: ... > im new to prolog ... Hopefully this hint will provoke you to add a simple line of code. ...
    (comp.lang.prolog)