def shuffle.swap
import bend-kit-random@0.1.0.1/random.bend as Randomimport Base
105def shuffle.swap(~T: Data, +i: U32, +j: U32, ax: Array<T> & T) -> Array<T>:
106 (a, xi) = ax
107 shuffle.swap.set(~T, i, j, xi, Array.get(T, a, j))
import bend-kit-random@0.1.0.1/random.bend as Randomimport Base
105def shuffle.swap(~T: Data, +i: U32, +j: U32, ax: Array<T> & T) -> Array<T>:
106 (a, xi) = ax
107 shuffle.swap.set(~T, i, j, xi, Array.get(T, a, j))