Package: effect
Module: Tuple
Swaps the elements of a tuple with two elements.
Example
import * as assert from "node:assert"
import { swap } from "effect/Tuple"
assert.deepStrictEqual(swap(["hello", 42]), [42, "hello"])
Signature
declare const swap: <L, R>(self: readonly [L, R]) => [R, L]
Since v2.0.0