Explain with an example what is “Setof” predicate in Prolog?
Answer Posted / chaitanya
In Prolog, “Setof” predicate can be used to find out all the solutions of a predicate. For example, you have this database:
Guru99 (SAP, Testing Tools)
Guru99 (PHP, Perl)
And if you want to find the solutions of Guru99 (X, Y). We can enter
Setof ([ X,Y] , Guru99 (X,Y), Z).
Z = [[ SAP , Testing Tools], [ PHP, Perl] ]
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the different nlp tasks deep learning can be applied?
Explain List of artificial intelligence projects?
Explain List of programming languages for artificial intelligence?
What is the output of the given statement? * (defclass article() ((title :accessor article-title :initarg :title) (author :accessor article-author :initarg :author))) * (defclass computer-article (article) ()) * (defclass business-article (article) ()) * (defclass political-article (article) ()) * (setf articles (list (make-instance ‘business-article :title “Memory Prices down”))) a) Business article b) Political article c) Business article
What does the language of fopl consist of?