summaryrefslogtreecommitdiff
path: root/prolog/problems/sorting/is_sorted_1/en.py
blob: 9848df1b894cf2371fe022ea8b12dafe7b3e3615 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# coding=utf-8

name = 'is_sorted/1'
slug = 'check if list is sorted'

description = '''\
<p><code>is_sorted(L)</code>: the elements of list <code>L</code> are sorted in non-decreasing order.</p>
<pre>
?- is_sorted([2,3,6,8,12]).
  true.
?- is_sorted([2,3,1,6,5]).
  false.
</pre>'''

hint = {}