Sum and product of an array: Difference between revisions
Content added Content deleted
(→{{header|Common Lisp}}: add loop example) |
m (→{{header|GAP}}) |
||
Line 615: | Line 615: | ||
Product(v); |
Product(v); |
||
# 40320 |
# 40320 |
||
# You can sum or multiply the result of a function |
|||
Sum(v, n -> n^2); |
|||
# 204 |
|||
Product(v, n -> 1/n); |
|||
# 1/40320</lang> |
|||
=={{header|Go}}== |
=={{header|Go}}== |