Which one of the following is a correct implementation of the meta-predicate “not” in PROLOG (Here G represents a goal)?
A. not (G):– !, call(G), fail. not(G).
B. not (G):– call(G), !, fail. not(G).
C. not (G):– call(G), fail, !. not(G).
D. not (G):– call(G), fail. not(G):– !.
Answer:B
Which one of the following is a correct implementation of the meta-predicate “not” in PROLOG (Here G represents a goal)?
A. not (G):– !, call(G), fail. not(G). B. not (G):– call(G), !, fail. not(G). C. not (G):– call(G), fail, !. not(G). D. not (G):– call(G), fail. not(G):– !.