mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-01-17 14:18:13 +01:00
17 lines
270 B
Markdown
17 lines
270 B
Markdown
# 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]);
|