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

Add aggregate method #43

Closed
EntilZha opened this issue Oct 26, 2015 · 1 comment
Closed

Add aggregate method #43

EntilZha opened this issue Oct 26, 2015 · 1 comment
Labels
Milestone

Comments

@EntilZha
Copy link
Owner

As part of #38, add an aggregate method.

@EntilZha EntilZha added this to the 0.4.0 milestone Oct 26, 2015
@EntilZha
Copy link
Owner Author

Since the aggregate method is being added to support a LINQ-like interface primarily, I have done some research into what its API should be. Based on the Microsoft documentation for LINQ for one argument, two argument and three argument aggregate, here is what I will be implementing.

aggregate will take either one, two, or three arguments.

  • One Argument: This will mimic the behavior in fold_left with the seed value being the first element in the list
  • Two Argument: This will mimic the behavior of fold_left
  • Three argument: This will mimic the behavior of fold_left with the additional argument being a function to apply to the final result before returning.

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

No branches or pull requests

1 participant