def total
import bend-ml-llama@0.2.1.0/main.bend as BendMlLlamaimport Base
1202# acc plus the weights of cs, in order
1203def total(cs: List<&2, Cand>, +temp: F32, +top: F32, +acc: F32) -> F32:
1204 match cs:
1205 case Nil{}:
1206 acc
1207 case Con{Cand{+v, i}, t}:
1208 total(t, temp, top, F32.add(acc, weight(v, temp, top)))