Question: Write a predicate count in prolog that returns the number of atoms inside a list. It should take count(a,[a,c,d,a,b,a],X) and this should return X =
Write a predicate count in prolog that returns the number of atoms inside a list. It should take count(a,[a,c,d,a,b,a],X) and this should return X = 3.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
