1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
# coding=utf-8 id = 120 group = 'lists' number = 27 visible = True facts = None solution = '''\ count(_, [], 0). count(X, [X|T], N) :- count(X, T, NT), N is NT + 1. count(X, [Y|T], NT) :- X \== Y, count(X, T, NT). '''