So, I am very new to Prolog and I have to write a short code about timetable. How can I add the findall function to a code itself?
happening(monday,chemistry).
happening(monday,english).
happening(tuesday,chemistry).
happening(wednesday,maths).
happening(friday,chemistry).
happening(friday,maths).
And now I want to write a command that shows how many times do I have chemistry in a week.
find_lessons(X) :-
findall(X,happening(X,chemistry), Bag).