# `Machete.InAnyOrderMatcher`
[🔗](https://github.com/mtrudel/machete/blob/main/lib/machete/matchers/in_any_order_matcher.ex#L1)

Defines a matcher that matches lists in any order

# `t`

```elixir
@opaque t()
```

Describes an instance of this matcher

# `in_any_order`

```elixir
@spec in_any_order([Machete.Matchable.t()]) :: t()
```

Matches lists in any order. Matchers are applied in all possible orders
until one matches; *this can be exponentially expensive* for long lists.

Examples:
    iex> assert [1] ~> in_any_order([1])
    true

    iex> assert [2, 1] ~> in_any_order([1, 2])
    true

    iex> assert [1, "a", :a] ~> in_any_order([string(), atom(), integer()])
    true

    iex> refute [1, 2] ~> in_any_order([1, 3])
    false

---

*Consult [api-reference.md](api-reference.md) for complete listing*
