def list.sum.go

bend-ml-llama@0.2.0.0 · main.bend:310

import bend-ml-llama@0.2.0.0/main.bend as BendMlLlama
import Base

310# acc + xs, a running sum from the left
311def list.sum.go(xs: List<&2, F32>, acc: F32) -> F32:
312  match xs:
313    case Nil{}:
314      acc
315    case Con{+h, t}:
316      list.sum.go(t, (acc + h : F32))

Uses (3)

Used by (2)