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 -

java - How to put two numbers separated by a space into two different arrays -

python - matplotlib equivalent for Ubuntu servers with no GUI? -