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

id = 122
number = 29
visible = True
facts = None

solution = '''\
sins(X, [], [X]).
sins(X, [Y|T], [X,Y|T]) :-
  X =< Y.
sins(X, [Y|T], [Y|L]) :-
  X > Y,
  sins(X, T, L).
'''