Util.list_take_pad: def of unified-nsga-iii@0.2.2.0 Import: import unified-nsga-iii@0.2.2.0/util.bend as Util Lines 10-13 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=10&end_line=13 import Base # |take(xs ++ replicate(n, fill), n)| = n. Identity when |xs| = n # (take never reads the pad). Used to lock Run / select to the law size. def list_take_pad(-A: Data, +fill: A, xs: List<&2, A>, +n: Nat) -> List<&2, A>: List.take(&2, A, List.append(&2, A, xs, List.replicate(A, n, fill)), n) Uses (5): 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.replicate https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.take https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat