baml._sum_int
(internal) Native backing for `int[].sum()`; call that instead. Adds every element left to right starting from `0`, range-checking the running total at each step. The empty array sums to `0`.
Reference version
Signature
function baml._sum_int(values: int[]) -> int throws never
(internal) Native backing for int[].sum(); call that instead. Adds every
element left to right starting from 0, range-checking the running total at
each step. The empty array sums to 0.
Panics
baml.panics.IntegerOverflowwhen a running total leaves theintrange.
Source:<builtin>/baml/containers.bamlbytes 39140–39215