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

id = 107
number = 14
visible = True
facts = None

solution = '''\
del107(X, [X|T], T).
del107(X, [Y|T], [Y|L]) :-
  del107(X, T, L).
permute([], []).
permute(L, [X|P]) :-
  del107(X, L, L1),
  permute(L1, P).
'''