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 - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -