Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change sum to total and make a new implemntation of sum #28

Open
65001 opened this issue Sep 24, 2019 · 1 comment
Open

Change sum to total and make a new implemntation of sum #28

65001 opened this issue Sep 24, 2019 · 1 comment

Comments

@65001
Copy link
Owner

65001 commented Sep 24, 2019

Is your feature request related to a problem? Please describe.
We should change rename the current sum function to be called total and create a new sum function that takes four parameters such as start index, end index, index variable, function.

This new sum function could have optimizations such as the sum of [0,n] or [1,n] is known to be n * (n - 1)/2.

@65001
Copy link
Owner Author

65001 commented Jan 2, 2020

sum( function, variable,start index,end index,frequency) is probably a good function signature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant