Σ & ∏
#3075
Replies: 1 comment 2 replies
-
Thanks for your suggestion, it's an interesting idea. Maybe it would be better to have the function as first argument:
Because that is how you would read it aloud: "The sum of ... for k is 0 to 10". Note that this function is just eye candy for: sum(range(initVal, endVal)).map(callback) So I'm not entirely sure it would add much. It reads very natural though, and with EDIT: updated the example |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to be able to use the sum (Σ) or the product (∏)
like this
Unfortunately
math.sum()
only allow to sum parameters or matrix terms.I suggest to add a new signature for
sum
(andprod
) if 3rd term is a function:example:
Beta Was this translation helpful? Give feedback.
All reactions