I thought S would be bound to [a(X)], but really to [a(_)]. Should be careful.
% ?- L = [a(X)], findall(A, ( member(A, L), functor(A, a, 1)), S).
%@ L = [a(X)],
%@ S = [a(_)].
I thought S would be bound to [a(X)], but really to [a(_)]. Should be careful.
% ?- L = [a(X)], findall(A, ( member(A, L), functor(A, a, 1)), S).
%@ L = [a(X)],
%@ S = [a(_)].