def try_add.go

unified-nsga-iii@0.2.2.0 · algorithm.bend:148

import unified-nsga-iii@0.2.2.0/algorithm.bend as Algorithm
import Base
import unified-nsga-iii@0.2.2.0/individual.bend as Ind

148def try_add.go(+acc: List<&2, Ind.Individual>, +child: Ind.Individual, +seen: List<&2, List<&2, F32>>, +key: List<&2, F32>, skip: Bool) -> List<&2, Ind.Individual> & List<&2, List<&2, F32>> & Bool:
149  match skip:
150    case True{}:
151      (acc, seen, False{})
152    case False{}:
153      (List.append(&2, Ind.Individual, acc, [child]), key <> seen, True{})

Uses (7)

Used by (1)