Prolog


PART V - Sorting

<< Previous  Main  Next >> 

Example #1: Sorting

exists_more[G,P]:-val[G,Y,Q]*eval[Q>P].
most[X,G]:-val[G,X,P]*~exists_more[G,P].
oldest[X]:-most[X,age].
val[age,jerry,21].
val[age,steven,17].
val[age,jennifer,7].

Resolution Trace for Example #1:

<Under Construction>

<< Previous  Main  Next >> 

Next: Even-Odd


Questions? Comments? Send them here. Or return to deXXed.