summaryrefslogtreecommitdiff
path: root/prolog/problems/sets/diff_3/common.py
blob: fee93b231b6120bfa984876f288805f6c35d6e7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# coding=utf-8

id = 130
number = 37
visible = True
facts = None

solution = '''\
memb130(X, [X|_]).
memb130(X, [_|T]) :-
  memb130(X, T).

diff([], _, []).
diff([H|T], S2, [H|D]) :-
  \+ memb130(H, S2),
  diff(T, S2, D).
diff([H|T], S2, D) :-
  memb130(H, S2),
  diff(T, S2, D).
'''