Survival.insert_bag: def of unified-nsga-iii@0.2.2.0 Import: import unified-nsga-iii@0.2.2.0/survival.bend as Survival Lines 891-898 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=891&end_line=898 import Base def insert_bag(acc: List<&2, Bag>, +b: Bag, before: Bool) -> List<&2, Bag>: match acc before: case Nil{} p: [b] case +h <> t True{}: b <> {h <> t : List<&2, Bag>} case +h <> +t False{}: h <> insert_bag(t, b, insert_before(t, b)) Uses (4): 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=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=insert_before