src/math.bend source
src/math.bend on the hub · documented module
import Basedef total(xs: List<Nat>) -> Nat: match xs: case Nil{}: 0n case Con{h, t}: Nat.add(h, total(t))
src/math.bend on the hub · documented module
import Basedef total(xs: List<Nat>) -> Nat: match xs: case Nil{}: 0n case Con{h, t}: Nat.add(h, total(t))