def lin_alphas_from
import mlbend-generative@0.1.1.0/main.bend as MlbendGenerativeimport Base
181# The schedule ᾱ_1 .. from `from` on, `left` entries, the running product
182# riding beside. The count left is the recursion; the step and the
183# product ride after it.
184def lin_alphas_from(+steps: Nat, +left: Nat, +from: Nat, +acc: F32) -> List<&2, F32>:
185 match left:
186 case 0n:
187 Nil{}
188 case 1n+rest:
189 +acc2 = (acc * (1.0 - lin_beta_at(from, steps) : F32) : F32)
190 Con{acc2, lin_alphas_from(steps, rest, (1n + from : Nat), acc2)}