I have three types of facts: album(code, artist, title, date). songs(code, songlist). musicians(code, list).
I am new to Prolog and I开发者_如何学C\'m trying to to create function that will simply remove all instances of an element from a list. The following code is whatI have so far:
I have a problem in my code with turbo prolog which searches all paths and the shortest path in a graph between 2 nodes.
The following predicate is remove(L,X,R), where L is a list, X is an element to remove from the list. The code returns the correct list, however it always also returns false afterwards.
Lets say that I would like to construct a list (L2) by appending elements of another list (开发者_运维百科L) one by one. The result should be exactly the same as the input.
I am new to learning prolog, and I want to know, if we have some procedure like father(\"Nic\",\"Adam\").
I have a very weird problem with PROLOG. I have used it before, but it\'s been a while and I\'m rusty. I have a list of variables and I need to ensure that none of them are the same.
What I need to do is to break atom to tokens. E. g.: tokenize_string(\'Hello, World!\', L). would unify L=[\'Hello\',\',\',\'World\',\'!\']. Exactly as tok开发者_如何学JAVAenize_atom/2 do. But when
I have this problem containing some inequations and requirement to minimize a value. After doing some research on the Internet, I came to conclusion that using Prolog might be the easiest way to solve
I\'m diving into the world of prolog headfirst but I seem to have hit shallow water! I\'m looking开发者_如何学Go at database manipulation in prolog with regards to this tutorial:Learn Prolog Now!