Util.nats_sum: def of unified-nsga-iii@0.2.2.0 Import: import unified-nsga-iii@0.2.2.0/util.bend as Util Lines 103-109 of unified-nsga-iii@0.2.2.0/util.bend: https://jend.leeeet.dev/read.txt?path=unified-nsga-iii@0.2.2.0/util.bend&start_line=103&end_line=109 import Base # Sum of a Nat histogram. Used to lock mid-split count conservation. def nats_sum(xs: List<&2, Nat>) -> Nat: match xs: case Nil{}: 0n case +x <> rest: Nat.add(x, nats_sum(rest)) Uses (3): 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.add