def perm

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

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

322# Go's Perm: a shuffle of 0..n-1
323def perm(~S: Data, ~next: S -> W.U64 & S, s: S, +n: Nat) -> List<&2, Nat> & S:
324  shuffle(~Nat, ~S, ~next, s, range(n))

Uses (6)

Used by (2)