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

id = 132
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).
'''