Survival.pick_among.nrows: def of unified-nsga-iii@0.2.2.0 Import: import unified-nsga-iii@0.2.2.0/survival.bend as Survival Lines 638-646 of unified-nsga-iii@0.2.2.0/survival.bend: https://jend.leeeet.dev/read.txt?path=unified-nsga-iii@0.2.2.0/survival.bend&start_line=638&end_line=646 import Base import unified-nsga-iii@0.2.2.0/rng.bend as Rng def pick_among.nrows(+rows: List<&2, NRow>, n: Nat, +fallback: Nat, rng: Rng.State) -> Rng.State: match n: case 0n: Rng.with_k(rng, fallback) case 1n: Rng.with_k(rng, first_row_i(rows)) case 1n+p: +rng2 = Rng.next_nat(rng, 1n+p) Rng.with_k(rng2, nrow_i(get_nrow(rows, Rng.last_nat(rng2)))) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List 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=last_nat https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/rng.bend&name=next_nat https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/rng.bend&name=with_k https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/survival.bend&name=NRow https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/survival.bend&name=first_row_i https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/survival.bend&name=get_nrow https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/survival.bend&name=nrow_i