How to generate the permutation of a vector with elements selected from a certain set

julia> [[x,y,z] for x=0:1 for y=0:1 for z=0:1]
8-element Array{Array{Int64,1},1}:
 [0, 0, 0]
 [0, 0, 1]
 [0, 1, 0]
 [0, 1, 1]
 [1, 0, 0]
 [1, 0, 1]
 [1, 1, 0]
 [1, 1, 1]
1 Like