Question: Maple command to generate all possible arrangements

I looked at combinat package but it is too large and could not find what I want.

I'll explain with example to make it easy. Given n=2 I want to generate all possible arrangements of sets of length n where each element can be either +1 or -1. So it will be 2^n=4 possible arrangements

And for n=3 then want to generate all possible sets of length 3 where each element can be either +1 or -1 so it will be  2^n=2^3=8 possible sets

And for n=4 it will be 2^n=16 possible arrangements

And so on. I picked [+1,-1] in the above as an example.   

Is there a command to do this in Maple?  I can ofcourse program it using using loops and if's and so on. But thought there might be a command in Maple package which will generate all these possibles sets. Either as list of lists or Matrix or any other format. 

 

Please Wait...