Prolog count the number of times a predicate is true

前端 未结 3 1797
我寻月下人不归
我寻月下人不归 2020-12-17 09:01

I want to count the number of times a custom predicate is true. For example, I have the following code:

is_man(john).
is_man(alex).
?:-is_man(X).
         


        
3条回答
提交回复
热议问题