def swap_at

bend-collections-laws-crypto@1.0.0.0 · src/math/random/rand.bend:281

import bend-collections-laws-crypto@1.0.0.0/src/math/random/rand.bend as Rand
import Base
import bend-collections-laws-crypto@1.0.0.0/src/math/u64.bend as W
import bend-collections-laws-crypto@1.0.0.0/src/math/w64.bend as X

281def swap_at(-A: Data, -S: Data, xs: List<&2, A>, +i: Nat, p: W.U64 & S) -> List<&2, A> & S:
282  (+j, s) = p
283  (swap(A, xs, i, X.n48(j)), s)

Uses (7)

Used by (2)