I have a predicate that generates sublists like this,
?- f([1,2,3,#,5,6,7,8,#,10,11,12],L).
L = [1,2,3];
L=[5,6,7,8];
L=[10,11,12];
false.
When I call it with variables instead of constants they unify with # ruining the output and stopping them from unifying later. How can I stop he variables from unifying with # like this?