Survival.bag_put.go: def of unified-nsga-iii@0.2.2.0 Import: import unified-nsga-iii@0.2.2.0/survival.bend as Survival Lines 744-763 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=744&end_line=763 import Base def bag_put.go( bags: List<&2, Bag>, +row: NRow, +seeded: Nat, +pos: Nat, +rev: List<&2, Bag>, same: Bool ) -> List<&2, Bag>: match bags same: case Nil{} p: List.append(&2, Bag, List.reverse(&2, Bag, rev), [Bag{nrow_r(row), seeded, [MRow{pos, row}]}]) case Bag{+ref, +count, +members} <> rest True{}: List.append( &2, Bag, List.reverse(&2, Bag, rev), Bag{ref, count, List.append(&2, MRow, members, [MRow{pos, row}])} <> rest ) case Bag{+ref, +count, +members} <> +rest False{}: bag_put.go(rest, row, seeded, pos, Bag{ref, count, members} <> rev, head_is_ref(rest, nrow_r(row))) Uses (10): 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=List.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.reverse 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=Bag https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/survival.bend&name=MRow 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=head_is_ref https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/survival.bend&name=nrow_r