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

**URL:** https://discourse.julialang.org/t/is-there-a-way-to-list-out-all-possible-permutations-of-a-sequence-of-indicator-functions/85532
**Category:** New to Julia
**Tags:** question
**Created:** [August 9, 2022, 12:49pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-list-out-all-possible-permutations-of-a-sequence-of-indicator-functions/85532 "2022-08-09T12:49:01Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)
#### Post date: [August 9, 2022, 3:16pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-list-out-all-possible-permutations-of-a-sequence-of-indicator-functions/85532/6 "2022-08-09T15:16:03Z")

</div>

See [this other post](https://discourse.julialang.org/t/iterator-over-variable-number-of-arguments/3558/3) for an alternative solution using Base Iterators.product:

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

```

---

_[View the full topic](https://discourse.julialang.org/t/is-there-a-way-to-list-out-all-possible-permutations-of-a-sequence-of-indicator-functions/85532)._
