1
votes

Let's say I have this rule:

andR( conj(C,D) ).

So I want it to match with items such as conj(x,y) which is fine. However, how do you get it to match with something more complicated like (i.e. a conjunction again but not of two atoms):

andR( conj(not(conj(not(a),c)),c),not(a) ).

because Prolog doesn't match with this with my andR/1 predicate because it interprets a comma and thinks that I've tried calling a /1 predicate with 2 paramaters.

Any ideas guys? This has puzzled me for a while now!

1

1 Answers

0
votes

Don't you need an additional conj surrounding the top level conj and not?