Is there a way to list out all possible permutations of a sequence of indicator functions?

See this other post for an alternative solution using Base Iterators.product:

import Base.Iterators: flatten, product
N = 6
collect(flatten([product([0:1 for _ in 1:N]...)])) 
1 Like