Survival.nearest_go: def of unified-nsga-iii@0.2.2.0 Import: import unified-nsga-iii@0.2.2.0/survival.bend as Survival Lines 245-259 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=245&end_line=259 import Base # First-min on strict `<` (ties keep the lower index). Sequential over # dirs; associate_raw already mid-splits per individual. def nearest_go(+f: List<&2, F32>, dirs: List<&2, List<&2, F32>>, +i: Nat, +best_i: Nat, +best_d: F32) -> Assignment: match dirs: case Nil{}: MkAssignment{best_i, best_d, 0n} case +w <> ws: +d = perp(f, w) nearest_go( f, ws, 1n+i, Bool.pick(Nat, F32.is_lt(d, best_d), i, best_i), Bool.pick(F32, F32.is_lt(d, best_d), d, best_d) ) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.is_lt 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/survival.bend&name=Assignment https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/survival.bend&name=perp