Simple?? Prolog question
Simple?? Prolog question
(OP)
Er, hello? hehe :)
If there is anyone out there, then could they please please help a Prolog newbie?
All I have to do is take a list of numbers (E.g. [1,2,3,4,5]) and given the query thirdhighest([1,2,3,4,5],X). should return X=3.
This, I am sure, is dead easy. However, I have spent far too long in the imperical procedural world of Java and VB and just can't even get a simple predicate like highest going.
Cheers
If there is anyone out there, then could they please please help a Prolog newbie?
All I have to do is take a list of numbers (E.g. [1,2,3,4,5]) and given the query thirdhighest([1,2,3,4,5],X). should return X=3.
This, I am sure, is dead easy. However, I have spent far too long in the imperical procedural world of Java and VB and just can't even get a simple predicate like highest going.
Cheers




