def list.sum.go

bend-ml-llama@0.2.1.0 · main.bend:311

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

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

Uses (3)

Used by (2)