1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
# coding=utf-8 id = 129 group = 'sets' number = 36 visible = True facts = None solution = '''\ memb129(X, [X|_]). memb129(X, [_|T]) :- memb129(X, T). intersect([], _, []). intersect([H|T], S2, [H|I]) :- memb129(H, S2), !, intersect(T, S2, I). intersect([_|T], S2, I):- intersect(T, S2, I). '''