How do I make sure that all the elements of a prolog list are either 0 or 1?
I need to generate a list of given length and make sure it has only these 2 numbers in it:
E.g. [0,0,0,0,0,0], [1,0,0,1,0,1,1] etc
I suppose the use of libraries like IC or FD is needed but I can't quite figure out how to deal with this with the methods in each.