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

id = 132
group = 'sets'
number = 39
visible = True
facts = None

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

is_subset([], _).
is_subset([H|T], S2) :-
  memb132(H, S2),
  is_subset(T, S2).
'''