def uniq_refs.go
import unified-nsga-iii@0.2.2.0/survival.bend as Survivalimport Base
import unified-nsga-iii@0.2.2.0/util.bend as Util
122def uniq_refs.go(rows: List<&2, NRow>, +acc: List<&2, Nat>) -> List<&2, Nat>:
123 match rows:
124 case Nil{}:
125 List.reverse(&2, Nat, acc)
126 case +row <> rest:
127 +r = nrow_r(row)
128 uniq_refs.go(rest, keep_nat(r, acc, Bool.not(Util.in_nats(r, acc))))