1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 22:28:16 +01:00
dotSCAD/docs/lib3x-sum.md
2021-02-24 14:33:56 +08:00

271 B

sum

Use + to sum up all elements in a list.

Since: 2.4

Parameters

  • lt : a list of elements that can be applied by +.

Examples

use <util/sum.scad>;

assert(sum([1, 2, 3, 4, 5]) == 15);
assert(sum([[1, 2, 3], [4, 5, 6]]) == [5, 7, 9]);