def peel

unified-nsga-iii@0.2.2.0 · non_dominated_sort.bend:258

import unified-nsga-iii@0.2.2.0/non_dominated_sort.bend as NonDominatedSort
import Base

258def peel(fuel: Nat, remaining: List<&2, Row>) -> List<&2, List<&2, Nat>>:
259  match fuel remaining:
260    case 0n Nil{}:
261      Nil{}
262    case 1n+f Nil{}:
263      Nil{}
264    case 0n +r <> +rest:
265      row_idxs({r <> rest : List<&2, Row>}) <> Nil{}
266    case 1n+f +r <> +rest:
267      +s = split_front({r <> rest : List<&2, Row>})
268      split_fst(s) <> peel(f, split_snd(s))

Uses (7)

Used by (1)