src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.ts/sumLengths
export function sumLengths<T>(items: readonly T[], lengthFn: (item: T) => Length): Length {
	return items.reduce((a, b) => lengthAdd(a, lengthFn(b)), lengthZero);
}