def concat.total
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytesimport Base
387def concat.total(xs: List<&1, Bytes>, +n: U32) -> List<&1, Bytes> & U32:
388 match xs:
389 case Nil{}:
390 (Nil{}, n)
391 case Con{x, t}:
392 Bytes{+l, buf} = x
393 concat.total.con(Bytes{l, buf}, concat.total(t, (n + l : U32)))