NonDominatedSort.peel: def of unified-nsga-iii@0.2.2.0 Import: import unified-nsga-iii@0.2.2.0/non_dominated_sort.bend as NonDominatedSort Lines 258-268 of unified-nsga-iii@0.2.2.0/non_dominated_sort.bend: https://jend.leeeet.dev/read.txt?path=unified-nsga-iii@0.2.2.0/non_dominated_sort.bend&start_line=258&end_line=268 import Base def peel(fuel: Nat, remaining: List<&2, Row>) -> List<&2, List<&2, Nat>>: match fuel remaining: case 0n Nil{}: Nil{} case 1n+f Nil{}: Nil{} case 0n +r <> +rest: row_idxs({r <> rest : List<&2, Row>}) <> Nil{} case 1n+f +r <> +rest: +s = split_front({r <> rest : List<&2, Row>}) split_fst(s) <> peel(f, split_snd(s)) Uses (7): 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/non_dominated_sort.bend&name=Row https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/non_dominated_sort.bend&name=row_idxs https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/non_dominated_sort.bend&name=split_front https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/non_dominated_sort.bend&name=split_fst https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/non_dominated_sort.bend&name=split_snd