# `Juggernaut.Operators.PatternSwap`
[🔗](https://github.com/holsee/juggernaut/blob/v0.4.0/lib/juggernaut/operators/pattern_swap.ex#L1)

Exchanges two variables of different names inside a pattern container (Mutare
`pattern_swap`): the elements of a tuple or list, or the values of a map or keyword
list. One mutant per pair. `_` and `_name` variables are not moved, nor are pinned
ones; keys stay in place. A whole argument list is not a container.

Bitstring segment values are not swapped (Mutare swaps them when no other segment uses
one as a size).

---

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