我试图向A添加字母,而两个头是相同的,但它返回假
:- set_prolog_flag(double_quotes, chars).
add(X,[Y|Tail],[Y|Tail1]):-
add(X,Tail,Tail1).
firsts(A,[],[]).
firsts(A ,Word1, Word2) :-
Word1 = [H1|T1] , Word2 = [H2|T2],
H1 == H2,
add(H1,[],A),
firsts(A,T1,T2).
我的代码由于某种原因返回false