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

id = 121
group = 'sorting'
number = 28
visible = True
facts = None

solution = '''\
is_sorted([]).
is_sorted([_]).
is_sorted([H1,H2|T]) :-
  H1 =< H2,
  is_sorted([H2|T]).
'''