% Regression: findall/3 must work with a non-ground template that becomes ground
% per-solution (ISO semantics).

p(1).
p(2).

q(L) :- findall(X, p(X), L).

ok :-
  q(L),
  L = [1,2].
