Natural.lsum: def of bend-collections-laws-math@1.0.0.0 Import: import bend-collections-laws-math@1.0.0.0/spec/math/natural.bend as Natural Lines 79-85 of bend-collections-laws-math@1.0.0.0/spec/math/natural.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-math@1.0.0.0/spec/math/natural.bend&start_line=79&end_line=85 import Base # List.sum and List.prod as right folds def lsum(xs: List<&2, Nat>) -> Nat: match xs: case Nil{}: 0n case Con{x, t}: Nat.add(x, lsum(t)) Uses (3): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add