ReferenceDirections.nth_comp.go: def of unified-nsga-iii@0.2.2.0 Import: import unified-nsga-iii@0.2.2.0/reference_directions.bend as ReferenceDirections Lines 70-97 of unified-nsga-iii@0.2.2.0/reference_directions.bend: https://jend.leeeet.dev/read.txt?path=unified-nsga-iii@0.2.2.0/reference_directions.bend&start_line=70&end_line=97 import Base @unsafe def nth_comp.go( ready: Bool, take: Bool, fuel: Nat, +m: Nat, +p: Nat, +k: Nat, +i: Nat, left: Nat, c: Nat ) -> List<&2, Nat>: match ready take fuel: case True{} True{} f: i <> nth_comp.go(False{}, False{}, f, m, left, k, 0n, 0n, 0n) case True{} False{} f: nth_comp.go(False{}, False{}, f, 1n+m, p, Nat.sub(k, c), 1n+i, 0n, 0n) case False{} t 0n: nth_comp.fallback(m, p) case False{} t 1n+f: match m: case 0n: Nil{} case 1n: [p] case 1n+rd: +left2 = Nat.sub(p, i) +c2 = count(rd, left2) nth_comp.go(True{}, Nat.is_lt(k, c2), f, rd, p, k, i, left2, c2) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool 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=Base/base.bend&name=Nat.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/reference_directions.bend&name=count https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/reference_directions.bend&name=nth_comp.fallback