Rng.next_nat: def of unified-nsga-iii@0.2.2.0 Import: import unified-nsga-iii@0.2.2.0/rng.bend as Rng Lines 83-86 of unified-nsga-iii@0.2.2.0/rng.bend: https://jend.leeeet.dev/read.txt?path=unified-nsga-iii@0.2.2.0/rng.bend&start_line=83&end_line=86 import Base # Uniform integer in [0, n). n == 0n → 0n. def next_nat(s: State, n: Nat) -> State: +s2 = next_double(s) with_k(s2, idx_from(last_double(s2), n)) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/rng.bend&name=State https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/rng.bend&name=idx_from https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/rng.bend&name=last_double https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/rng.bend&name=next_double https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/rng.bend&name=with_k