Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
% count(List_to_test, Object_to_count, Number_of_occurence)
% when list is empty, 0 object
count([], _, 0).
count([H | T], Object, N) :-
% we test the rest of the list
count(T, Object, N1),
% We test if object fits with H
( my_test(H, Object) -> N is N1+1; N = N1).