% Prolog system: SWI-Prolog :-op(700,xfx,'::'). :- use_module(library(clpfd)). Xs :: D :- nonvar(Xs),Xs=[_|_],!, Xs ins D. X :: D :- X in D.