Prolog Predicates Flashcards
1
Q
length(X,2), append(_,X,[a,b,c,d,e]).
A
X = [d,e].
2
Q
X > 2, member(X, [1,2,3,4,5]).
A
Instantiation error
3
Q
member(X, [1,2,3,4,5]), X > 2
A
X = 3 ; X = 4 ; X = 5.
4
Q
member(X, [1,2,3,4]), member(X, [2,4]).
A
X = 2 ; X = 4.