If I have the following grammar: S → ε S → a S b S How do I implement it in Prolog? I tried this: isMatched([]).
I have to write a progra开发者_如何学编程m that will get lists in a list, and should reverse every second list, then return the result. Something like this:
First I apologize for any mistakes I may make since English is not my first language. So I decided to learn Prolog all by myself and I came across this \"challenge.\"
I have a problem with predicate which works in that way that it takes list of atoms: nopolfont([to,jest,tekśćik,\'!\'],L).
I\'m trying to make a prolog function (I know it\'s not a function but I can\'t recall it\'s name) that given a list and a number N returns a list with the elements that repeat at least N times.
I\'m reading \"Seven languages in seven weeks\" atm, and I\'m stumpe开发者_如何学JAVAd over some Prolog query that I don\'t understand the \'no\' response to.
I\'m trying to implement a simple algorithm for common differences(http://www.purplemath.com/modules/nextnumb.htm) in Prolog(to which I am pretty new) and I seem to be having trouble coming up with th
I use SWI-Prolog and I want to make a list of several other lists. For example, I want to put the following three lists
**FACTS** player(milan,[seedorf,zambrotta,gattuso]). player(inter,[seedorf,ronaldo,zambrotta]). player(realmadrid,[seedorf,zidane,ronaldo]).
I\'m trying to make my code more dynamic. I have a file with the following contents: a(b1, c1, d1). a(b2, c2, d2).