def map_prefix_pow.go

unified-nsga-iii@0.2.2.0 · problems.bend:383

import unified-nsga-iii@0.2.2.0/problems.bend as Problems
import Base

383# Fuel shrinks first so the recursive call terminates. The g-tail stays raw.
384def map_prefix_pow.go(fuel: Nat, xs: List<&2, F32>, +alpha: F32) -> List<&2, F32>:
385  match fuel:
386    case 0n:
387      xs
388    case 1n+f:
389      match xs:
390        case Nil{}:
391          Nil{}
392        case h <> t:
393          F32.pow(h, alpha) <> map_prefix_pow.go(f, t, alpha)

Uses (4)

Used by (1)