Assume I have the following rules: unify(\'test\', \'this is a test\'). run :- write(\'Enter something: \'),
this is my program tran(\'father\',\'otosan\'). tran(\'father\',\'chichiwe\'). tran(\'mother\',\'okasan\').
In prolog, we can do something like the following: myFunction a (a:xs) = ... This is, when the 1st argument of myFunction is the same as the first item of the list that\'s in the 2nd argument, this
I n开发者_运维知识库eed to create a family relationship using Prolog. I installed SWI Prolog on my laptop, and create a file with two variables just to get familiar with Prolog.
I have been trying to learn Prolog and came across this syntax on some example code. solve(Hs) :- Hs = [_,_,开发者_运维技巧_,_,_],
I\'ve got a list consisting of smaller lists inside of it, each list consisting of 2 items: [[a,1],[b,2],[c,3]]
I have a large number of facts within my program, listing developers and designers in a company, as well as previous projects, like so..
I know how to write to ordinary files, but I haven\'t found any resources on the web about binary files in Prolog.
This is for GNU-Prolog I\'m having trouble getting a certain predicate to work. Its functionality is that it matches a list of integers
I am trying to add a rule dynamically to the knowledge base using SWI-prolog where the body of the rule is unknown beforehand.