prolog check if a list is in ascending order -


i have list , want check if ordered. can point out error?

thanks

taxinomemene([]). taxinomemene([element1,element2|tail]):-         stoixio1>stoixio12,         taxinomemene([stoixio2|tail]). 

what if have singleton list , stoixio1 , stoixio12? condition should in terms of element1 , element2

is_sorted([]). is_sorted([_]). is_sorted([x,y|t]) :-    x=<y,    is_sorted([y|t]). 

Comments

Popular posts from this blog

php - Autoloader issue not returning Class -

ruby - Prevent Custom Validation Error on Association -

c++ - Why am i getting wrong values when performing PE base relocation? -