hex.swap (arity 3)ΒΆ

Unsafe if dst and src overlap! but safe if they are the exact same address.
hex1[:n], hex2[:n] = hex2[:n], hex1[:n]

SignatureΒΆ

def swap n, hex1, hex2 @ end { ... }

Defined in hex/memory.fj β€” lines 115–121 (view on GitHub).

ComplexityΒΆ

  • Time: n(3@)

  • Space: n(3@+36)

See the complexity glossary for what @, w, dw, dbit, n mean.

SourceΒΆ

Depends onΒΆ


← Previous: hex.swap/2