summaryrefslogtreecommitdiff
path: root/prolog/problems/sorting/is_sorted_1/en.py
blob: 8741bc79bec2ae52e01d51cd76b7629afe22e97b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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 = {}