Module

x/rambda/immutable.d.ts>swap

Faster and smaller alternative to Ramda
Latest
function swap
import { swap } from "https://dotland.deno.dev/x/rambda@9.4.1/immutable.d.ts";

Parameters

indexA: number
indexB: number

Returns

<T>(list: readonly T[]) => readonly T[]

Parameters

indexA: number
indexB: number
list: readonly T[]

Returns

readonly T[]