def first_cand

unified-nsga-iii@0.2.2.0 · survival.bend:494

import unified-nsga-iii@0.2.2.0/survival.bend as Survival
import Base

494# First remaining last-front index. Used when inNiche is empty
495# (C# would throw; never pick a phantom combined-pool index 0).
496def first_cand(cand: List<&2, Nat>) -> Nat:
497  match cand:
498    case Nil{}:
499      0n
500    case x <> _:
501      x

Uses (2)

Used by (4)