1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-19 13:01:37 +02:00
This commit is contained in:
Justin Lin
2020-05-23 11:20:33 +08:00
parent 29acdbd0e6
commit 37e6d3d810

16
docs/lib2x-sum.md Normal file
View File

@@ -0,0 +1,16 @@
# 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]);