Other common functor mistakes withing goals are shown below, along with the error diagnoses provided by the SICStus interpreter. Check the examples to verify that you know what is wrong in each case--this isn't always obvious from Prolog's response.
| ?- parent(a, b, X = f. ** , or ) expected in arguments ** parent ( a , b , X = f ** here ** . | ?- member(a, [a,b,c). ** , | or ] expected in list ** member ( a , [ a , b , c ** here ** ) .
| ?- parent(a,b) X = f. ** variable follows expression ** parent ( a , b ) ** here ** X = f . | ?- parent(a b),X = f. ** atom follows expression ** parent ( a ** here ** b ) , X = f .
| ?- parent (a,b). ** bracket follows expression ** parent ** here ** ( a , b ) . | ?-
<a.von.klopp@bangor.ac.uk>